Timeline for How can I save multiple dynamic values using check boxes?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 11, 2018 at 16:56 | comment | added | Nathanael | Thank you. You answered my question in letting me know that I will need to modify the view and controller. I don't believe repeatable fields will solve my problem because, to my understanding, repeatable fields save as an array to a single row in the database instead of multiple individual rows. Please let me know if you can help me with my custom handling problem in my new question: passing an array from view to controller to model | |
Mar 5, 2018 at 22:17 | vote | accept | Nathanael | ||
Mar 1, 2018 at 0:41 | comment | added | nibra | Your XML file allows one name field and one sid field. If you want custom handling, you have to change the view, controller and model accordingly. -- As an alternative, look into 'Custom Fields', which supports repeatable fields. | |
Feb 28, 2018 at 8:02 | comment | added | Nathanael |
Here is what I currently have in the orderform.xml file: <field name="name" size="150" maxlength="150" filter="string" type="text" required="true" label="COM_MERAKIAC_FORM_LBL_ORDER_NAME" description="COM_MERAKIAC_FORM_DESC_ORDER_NAME" hint="COM_MERAKIAC_FORM_LBL_ORDER_NAME"/> and for the sid field <field name="sid" size="150" maxlength="150" filter="string" type="text" required="true" label="COM_MERAKIAC_FORM_LBL_ORDER_SID" description="COM_MERAKIAC_FORM_DESC_ORDER_SID" hint="COM_MERAKIAC_FORM_LBL_ORDER_SID"/>
|
|
Feb 28, 2018 at 7:59 | comment | added | Nathanael | How do I write this array back to the database? I get the 'Warning: Field Required: Name, Field Required: Sid" error and nothing saves to the orders table. Do I need to modify the site/models/forms/orderform.xml file? Also, will this solution still allow me to save the name and sid as separate text columns in the orders table, or will the two be merged into one column of an array? I ask because I will later need to fetch these variables independently and use the SID as a shared key. | |
Feb 26, 2018 at 14:59 | history | answered | nibra | CC BY-SA 3.0 |