Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1498

Joomla! 4.x Coding • PredefinedList Field in a Template Admin?

$
0
0
I've used the PredefinedList Form Field within a form for a component and was very happy with that, but I would like to use one in the Admin page (TemplateDetails.xml) of a custom template.

The Predefined List is constructed from a collection of previously chosen and saved Param values from that same template. (The values in that predefined list are an array collected via a Checkboxes form field. The checkboxes builds a list of Google Fonts which are loaded dynamically for use by the template. The predefined list field should allow the administrator to select one of those fonts to use as default values in css declarations for various HTML elements, like headlines, paragraph text, or blockquotes.)

The problem comes from declaring the "Type" attribute of the predefinedList field within the XML document, which requires a custom format of "Myextension.Mycustompredefinedlist" to declare the field's type value - tpl_template name.list name is not recognized. The page renders a standard text field.

The only other option I can imagine is to build a custom DB table and call values via a SQL FormField.

Any suggestions? Is there a Standard FormField that can call option values from a Session variable or Constant value? Since this a front end template but needs to appear within an Admin interface, I'm not sure I can build a Custom FormField to do this, but I'd prefer to keep it contained within the template code.

Statistics: Posted by MonkeyT — Thu Dec 26, 2024 5:30 pm



Viewing all articles
Browse latest Browse all 1498

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>