• 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: Required fields conditional on other fields values

Required fields conditional on other fields values 14 years 9 months ago #8290

This comes up a lot so someone must have asked it already however I couldn't find any posts that answered it for a no-techie.

I would like to know how to make the "required" flag for a field conditional on the state of another field.

For example when you ask a yes/no question using a radfio button, and wish to require that an additional explanation be provided if the value of the radio button group="yes".

Or perhaps you have a checkbox following a billing address and before a shipping address that you want to have checked if the billing and shipping address are identical. In the case that it remains unchecked you wish to ake all the fields in the shipping address "required".

If someone can help with an explanation and some sample code that would be awesomne.
The administrator has disabled public write access.

Re:Required fields conditional on other fields values 14 years 2 weeks ago #10391

I'm looking for a similar answer - I'm attempting to do two different things in the same form:

1) Copy Billing Address to Shipping Address
Using a radio Yes / No I want to have the option to copy the Billing Address fields to the appropriate Shipping Address fields.

For example:
billingaddress1
billingaddress2
billingcity
billingstate
billingzip

When radio = Yes, Billing information copies to:
shippingaddress1
shippingaddress2
shippingcity
shippingstate
shippingzip

2) Hidden Field Pop-ups
I want to have a the user select an item from a drop down menu and upon selecting an item populate a second dropdown field.

i.e. Dropdown1 contains the following fields
item1
item2
item3

if user selects item1, dropdown2 is populated with:
item1a
item2a
item3a

if user selects item2, dropdown2 is populated with:
item1b
item2b
item3b
etc

I imagine, in my example of three items in dropdown1 that dropdown2 would really be three dropdowns that are hidden and called forth as visable when the appropriate item is selected.

I realize both of these are complex questions, but if someone could point me in the right direction I'm sure I can work it out.

Thanks
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!