XF 2.2 Where can I find instructions to adding an array type option in my options page?

Orit

Active member
On my options page, I would like to add an array option,
A textbox, where each entry would be on a different line.
Each entry should contain a string and a number (string number).

How can I do this? (I'm open to other ideas, so feel free to suggest...)

Thanks!
 
A textbox, where each entry would be on a different line.
You can use a single text input, store the option as a string, and split it into an array manually (like disallowedCustomTitles), or you can use a named template or PHP callback and store the option as an array (like censorWords). In either cause you can use a validation callback to validate the option value.
 
You can use a single text input, store the option as a string, and split it into an array manually (like disallowedCustomTitles), or you can use a named template or PHP callback and store the option as an array (like censorWords). In either cause you can use a validation callback to validate the option value.
The 'censorWords' method was exactly what I needed.
Thank you so much!!
 
Back
Top Bottom