Radio Button: There are three Radio buttons('radio1','radio2

Radio Button:
There are three Radio buttons('radio1','radio2' and 'radio3') as required fields in a form. Based upon the selection of 'radio1' either 'radio2' or 'radio3' should be shown. This I have done by javascript. But as the radio buttons are required fields, the hidden radio button is not allowing to submit the form. Can any one help me how to set null value for the hidden radio button(which is required field). Thanks in advance.

OriginalPostID-148241

OriginalPostID-148241

  Discussion posts and replies are publicly visible

Parents
  • @anilkumark I hope your issue will be resolved if you do as follows:

    I would like to suggest to control the 'required' attribute of radio2 and radio3 completely in java script on the load of form based on the value of radio1 i.e. write a script which will set the 'required' attribute of radio2 and radio3 depending on the value of radio1 and include the same on the load of form (I guess this is the script which you have already included in the above comments). And at the same time make the fields optional from the forms designer settings, as java script is already offering you the 'required' feature from your code.

    Also apply the same code snippet while you interact with 'radio1'.
Reply
  • @anilkumark I hope your issue will be resolved if you do as follows:

    I would like to suggest to control the 'required' attribute of radio2 and radio3 completely in java script on the load of form based on the value of radio1 i.e. write a script which will set the 'required' attribute of radio2 and radio3 depending on the value of radio1 and include the same on the load of form (I guess this is the script which you have already included in the above comments). And at the same time make the fields optional from the forms designer settings, as java script is already offering you the 'required' feature from your code.

    Also apply the same code snippet while you interact with 'radio1'.
Children
No Data