• 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: Default Value cleared when validation fails

Default Value cleared when validation fails 14 years 11 months ago #7625

I created a form that has default values in several fields. These values are very important to the proper functioning of my form. Unfortunately, when the form fails to validate and redisplays all the default values are cleared.

Is there some what to prevent this?

-Brent
The administrator has disabled public write access.

Re:Default Value cleared when validation fails 14 years 11 months ago #7626

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

The form information is sent when the user hits the submit button and the default values will be overwritten by the information submitted earlier.
So, if you have a text field with a default value "I AGREE", if the user modifies that value to "I DO NOT AGREE", when the form submits and the validation fails, he will end up with the "I DO NOT AGREE" value.
In an opposite case, if he does not touch the field, the value "I AGREE" will be submitted and will show up.

A link to the form in question would be useful.
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.

Re:Default Value cleared when validation fails 14 years 11 months ago #7630

Thanks Octavian.

The textboxes that contain the default values are used in a Javascript calculation. I want the visitor to be able to see but not change the values. So I used disabled="disabled" as an additional attribute on the text boxes.

If I remove disabled="disabled" the values don't cleared. Unfortunately, that won't work for me.

It looks like I'll have to do my own validating via Javascript before the form is submitted.

I wonder what the rational is behind clearing the values? They are displayed when the form initially loads.
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!