Creating and Setting Up Frontend Dynamic Selects
Before reading this section, please make sure you have read and understood the section on security in relation to Dynamic Selects use in the frontend.
Building Dynamic Selects for the frontend is a 3-step process. These steps are outlined below
Create Dynamic Selects in ProcessDynamicSelects
- In your ProcessWire Admin, click on the menu item Dynamic Selects. That will launch the Process module's dashboard.
- On the upper part of the dashboard, click on the label 'Add Selects' to open up the textarea input.
- Enter the title or titles of Dynamic Selects you want to create, one per line.
- Click either the button 'Save Unpublished' to create but not publish the Dynamic Selects, or the button, 'Publish' to create and publish the Dynamic Selects.
Please note that any Dynamic Selects that duplicates another's title will be ignored. Each Dynamic Selects is saved as a hidden page in the ProcessWire admin. Its settings are saved in the page's field 'ds_settings' as a JSON string.
Edit Dynamic Selects
A tabulated list of your newly created Dynamic Selects will appear in the lower part of the dashboard. The table has several columns showing you various information about each Dynamic Selects. Click on a title of a Dynamic Selects to edit it. This will open up the Dynamic Selects in so-called single-edit mode. In this context, you will be able to edit and fine-tune the settings of the opened Dynamic Selects. For a complete overview of each setting in this screen, please see the settings sections.
Set up the Dynamic Selects as desired and save. Carefully review your settings, especially in relation to securing the Dynamic Selects. If any errors are detected, these will be fed back to you. Correct the errors and save again. You are now ready to output this Dynamic Selects in the frontend.
Use MarkupDynamicSelects API in a Template File
To output a Dynamic Selects in the frontend, you will need to use MarkupDynamicSelects API in your template file. You will need to use several methods (functions) in that module. These are explained in the following section.