0

Sorry I am new to Joomla. I am trying to resolve an issue with the checkbox not updating on the module. I don't see any updating code specified in PHP, but somehow Joomla is updating it. Can someone shed some light in how it is doing so, and where to look into why it's not updating this field?

I have the following field xml object that refers to the fields (partial), it's not updating the checkbox:

<field name="type_template" type="Repeatable" icon="list" description="Specify Types of Donations" label="Types" default="">
  <fieldset hidden="true" name="type_template_modal" repeat="true">
    <field name="type" type="PJSelect" label="Type (PJ Code)"/>
      <field name="amount" type="text" default="25,50,100,250" label="Amounts" description="Comma seperated list of the amounts"/>
        <field name="typeRecur" type="checkbox" default="0" value="1" label="Recurring?" description="Check for recurring"/>
          <field name="typeRecurLabel" type="text" default="" label="Recurring Label"/>
          </fieldset>
        </field>
      </field>
    </field>
  </fieldset>
</field>

Let me know if you guys need additional details. Thanks

2 Answers 2

0
+50

This probably isn't the solution but the first thing I'm seeing is a number of unnecessary </field> and </fieldset> elements. Any xml element that ends with a front-slah before the closing bracket (eg, <field ... />) does not need a closing element (</field>).

With the unnecessary fields removed and the indentation fixed your jform xml should look more like this:

<field name="type_template" type="Repeatable" icon="list" description="Specify Types of Donations" label="Types" default="">
  <fieldset hidden="true" name="type_template_modal" repeat="true">
    <field name="type" type="PJSelect" label="Type (PJ Code)"/>
    <field name="amount" type="text" default="25,50,100,250" label="Amounts" description="Comma seperated list of the amounts"/>
    <field name="typeRecur" type="checkbox" default="0" value="1" label="Recurring?" description="Check for recurring"/>
    <field name="typeRecurLabel" type="text" default="" label="Recurring Label"/>
  </fieldset>
</field>

Check if correcting that has any effect.

3
  • Thank you, but sorry, i just took the partial code out of the xml and put in the closings. Feb 17, 2018 at 13:33
  • You took the partial code from the xml and pasted it un-edited? If so, then you may want to try replacing it with my version (It's possible the XML bugs are the source of your issue).
    – Drew G
    Feb 20, 2018 at 19:08
  • It appears that the checkbox itself while placed under a repeatable type is buggy on Joomla. I am gonna give out the bounty points to you for trying. Thank you Feb 24, 2018 at 13:06
0

The checkbox and radio input fields while wrapped inside a Repeatable field type, is buggy. Changing it to text works. Going to stick with text.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.