Customizer control pages dropdown

Hi All,
Grt to be here and using Pinegrow!
I am developing a Wordpress theme using Pinegrow.
In the Customizer, I would like to add a control where the user can select any existing page URL from a dropdown list.
I know that this is possible in Wordpress but can we do it with Pinegrow is my Q?

  • Thanks from Bob.

Hi guys

I have the same question: I would need an customizer control for a dropdown field. I need this dropdown-field for different events, depending on which event is going on at the moment.

Thanks for your help
Horst

Hi @HoWin,
Can you clarify this a little, please? Specifically:

  1. What will be displayed on the page? A single value selected in the customizer select field?
  2. Where are the values for the select fields coming from?
    Thanks,
    Bob

Hi @RobM

I have a select field with options, and I would like to change the amount of entries and the content of these options.

Example:

<select>
  <option>Content 1</option>
  <option>Content 2</option>
  <option>Conten 3</option>
</select>

Is this possible?

Thanks,
Horst

Hi @HoWin,
I’m still confused. Do you want a select field in the customizer, or do you want to change the content of a select field on the page?
Bob

@RobM: I want to change the content of a select field on the page (and also the number of entries).

Thanks :slight_smile:

Hi @RobM

Sorry to ask you again, but do you think that this can be done with a customizer field? It would be nice, but if not it’s also no big disaster. Then I have to modify the template every time I want to modify the content of the select (dropdown) field.

Horst

Hi @HoWin,
Sorry, this one slipped through my fingers, so to speak.
This is going to take a bit of PHP to accomplish. I would start with adding a select field on the page. Then add a customizer control action to that field. The setting type would be option and the control type would be custom. Next, you would need to create the callback in your inc->custom.php file. (This is actually where you should have created your new mailer function.) That function is going to have to be able to convert your customizer input to a set of select options and replace the current content on the field. This is a bit beyond what I’m able to help with quickly, but I can give you a couple of references:
The WordPress Customizer - A Developers Guide (Part 1) - Maddison Designs,
GitHub - maddisondesigns/customizer-custom-controls: WordPress Customizer Custom Controls
Good Luck!
Bob

Hi @RobM
Thanks for your reply and those two links. I will now dive deeper into this matter :slight_smile:

May I ask you one more favor?
You mean I should use custom.php for my modification to the mailer function. I asked google how to do this but couldn’t find the right answer. My question is: can I use custom.php to replace the whole wp_simple_form_mailer.php with an other custom page?

Your help is really great and very professional. I’m very happy with it. Thx

Horst