user458753
user458753

Reputation: 147

Joomla Jform subfieldset

im new to joomla but not new to programming or web development.

Got this joomla component where i have some specific form requirements which i just cant figure out how to implement.

It is basically a huge form with text fields radio buttons checkboxes etc. Now for some of those radio buttons and checkboxes when they are checked or the right option for radio button is selected there is a "subform" it should only appear when the user has checked the checkbox or selected "yes" instead of "no" for the radio buttons. And if they are shown they need to be validated as well.

i kinda have it partly working using JForm and some javascript but the problem is its kind of a javascript hackup solution not something i'm comfortable releasing as production code. Aside from that i currently cant have multiple sub levels.

what i need is:

form
  fieldset
    textfield
    textfield
    checkbox (if checked)
      fieldset
        textfield
    textfield
        radio button (if selected yes)
          fieldset
            textfield
            textfield
            radio button (if selected no)
              fieldset
                textfield
            textfield
            textfield
        textfield
        textfield
    checkbox (if checked)
      fieldset
        textfield
    textfield
    textfield
form

Im looking to create a modular solution where i use JForm and can just define everything in the xml.

If there is anyone who has done something similar or got some thought on how this should be done i would love to hear about it!

thanks in advance, Yrm

Upvotes: 0

Views: 477

Answers (1)

KiNG H
KiNG H

Reputation: 161

you can use jquery or javascript for manage this. first you have to create all fields. then you have to manage this thing to jquery.

see you have one field like redio button. when you select yes then it will call script and then you have to use property of form element "disabled=false".

this trick is work for me... hope you are getting this...:)

sorry for bad english :)

Upvotes: 1

Related Questions