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

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.

  • Thank you, but sorry, i just took the partial code out of the xml and put in the closings. – Suthan Bala Feb 17 '18 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 '18 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 – Suthan Bala Feb 24 '18 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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