Search

As I'm toying with multiple section links per section for front end forms, I'm finding this works far better than using dynamic options that are saved as only string values. I would rather represent dynamic menus as options with full text titles as text node values and IDs as attribute values.

That way, if the value of the linked item is modified, it is still referenced by the unique ID number and all references throughout the application are updated dynamically. You can see this working with the Client and Project Item fields in my Projects ensemble.

Using IDs, however, is not possible with select box fields for the current Beta Revision 5. If I use a text field, I will not have the ability to save both the ID value and the text value for the field, which works quite well with the current select box field. If the option of using IDs is added to select boxes, this will allow me to continue experimenting with the multiple section links solution, knowing that this will also work in the back end by at least displaying the list of IDs as options.

Ideally, though, I propose a change to how select boxes work. There should be a choice for which section field should be used for the text() node and which field should be used for the value attribute. It seems a poor limitation of the current implementation that the attribute must always be equal to the text value.

This sounds like a good idea. I believe it works like this in Rails, and I've found it very helpful in that context.

Hmm. I was wrong about saving both values. It was late, and I was looking at the result HTML as if it was the XML data. So I probably would be better off using a text field for this multiple section link idea, since it accomplishes the same thing, saving the ID, without the side effect of not displaying the value as a select box option in the Symphony admin.

For front end forms, I can still save the ID as the field value, while displaying the full text value as the option label.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details