• 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: {if} fdropdown list = # then validation = invalid

{if} fdropdown list = # then validation = invalid 3 years 1 month ago #41030

Hi,

I did a search but I did not find what I was looking for. I want to have a conditional on a drop-down list.

My "Drop-down List 1" is made up of:
- Select below -
value 1
value 2
value 3

When validating the form:
If in the "Drop-down List 1" list, the value is "- Select below -", then the field validation message is displayed to ask to select another line.

What would the code be and where to insert it?

Thank you in advance for your help!

Greetings from France
Dom
The administrator has disabled public write access.

{if} fdropdown list = # then validation = invalid 3 years 1 month ago #41039

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 722
  • Thank you received: 59
Hello Dom,

If the user needs to fill in this field in order to make the submission (the field is required), then you can simply use the following syntax when setting the first dropdown item to make sure that the default option is not accepted:

|- Select below -
value 1
value 2
value 3

This is due to setting the first item with a null value (items for dropdown, radio and checkbox fields can be set using a pipeline to define the value and label of each item) and the field being required.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
The following user(s) said Thank You: urszula.dziki

{if} fdropdown list = # then validation = invalid 3 years 1 week ago #41157

Thank you!!!!!!!!!!!!!!!!!!!!!!!!!!! I was looking why no validation for my multiple forms.......Great answer!
The administrator has disabled public write access.

{if} fdropdown list = # then validation = invalid 1 year 5 months ago #42375

  • bmeeker
  • bmeeker's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I tried using this, but there is no validation rule option, so I can't tell it not to accept nothing as an answer.
On the validations tab, there is just 2 boxes: Required and Validation Message.
So, when I tried filling out a test form, it didn't kick it back when nothing is selected and - Select Below - is shown.
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!