• 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: Clear default values from validation

Clear default values from validation 14 years 11 months ago #7491

I have a form with default values. The default values are the names of the form fields - this saves space. Javascript clears the default value when user clicks the field, and puts it back if he leaves the field empty. Some fields are mandatory, but I want to clear the default value (field name) when the form submits so that it doesn't confuse the validation. Otherwise, it'll accept 'first name' and 'surname' as inputs when really it shouldn't. How can I do this?
The administrator has disabled public write access.

Re:Clear default values from validation 14 years 11 months ago #7590

  • bogdanc
  • bogdanc's Avatar
  • OFFLINE
  • Moderator
  • Posts: 669
  • Thank you received: 11
Hello,

You can use a custom script that can do that. You can create a script in the field called Scripts called on form process, that can verify if a field has the value the same as its name, if it does the field will be cleared. This way inputs like "first name" and "surname" won't appear.

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