• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Set required based on value of other field

Set required based on value of other field 4 years 8 months ago #40462

  • dlm
  • dlm's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 71
Hi there,

I have a question. Is it possible to set a field required based on the condition / response of another field.
Example

Question > Are you married? "YES" or "NO"
If the answer "YES" is checked, a text field appears which may be filled in.
If the answer is "NO" is checked, a text field appears which must be filled in. (required*)

Thanks for feedback,
kind regards
The administrator has disabled public write access.

Set required based on value of other field 4 years 8 months ago #40463

  • dragos
  • dragos's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 634
  • Thank you received: 117
Hello,

You can try taking a look at RSForm!Pro's Conditional Fields functionality, this allows you to show a field (required or not required) based on the user's selection.
The administrator has disabled public write access.
The following user(s) said Thank You: dlm

Set required based on value of other field 4 years 8 months ago #40528

  • dlm
  • dlm's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 71
Hi,

thanks for feedback. Yes, the conditional fields can show or hide a field. But how to determine that the field is required or not? As set in my example:

Question > Are you married? "YES" or "NO"
If the answer "YES" is checked, a text field appears which may be filled in.
-> NOT required
If the answer is "NO" is checked, a text field appears which must be filled in. (required*)
-> YES required
The administrator has disabled public write access.

Set required based on value of other field 4 years 8 months ago #40529

  • dragos
  • dragos's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 634
  • Thank you received: 117
Hello,

You can simply set the not required field state to Not Required. More information on a Textbox field can be found here.
The administrator has disabled public write access.

Set required based on value of other field 4 years 8 months ago #40531

  • dlm
  • dlm's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 71
Hi there,

Yes I know,
but my question is, when you have set to NOT required, can it be changed to required when a certain selection has been made (in a conditional field that is)
The administrator has disabled public write access.

Set required based on value of other field 4 years 8 months ago #40532

  • dragos
  • dragos's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 634
  • Thank you received: 117
Hello,

You'll need to use two textbox fields, one required and displayed when choosing 'No', and one not required displayed when user is selecting 'Yes'.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!