Forums

"required" in disabled fields

Roberto Cravallo 17 Mar, 2014
First of all: Thanks, way cool tool! Very logical and made with love and care. Respect!!

I have been playing around for a few days now, and love this tool. 😀

Now I hit a wall. I managed to enable/disable fields depending on a selection from a dropdown. Very nice, keeps the user from filling out fields that are not needed. The problem? If I set fiels to required, they are still required when disabled. I would assume this is a logic "error" in chronoforms.

Should disabled fields not automatically excludes form the "required" list? I have no idea how to manually set the "required" to false during execution.

Ic tried to included my backup of the form, but I get a "file extension not allowed".
GreyHead 17 Mar, 2014
Hi Roberto,

I assume that this is CFv5, in which case it is probably a bug; CFv4 didn't check the validation on disabled inputs.

Bob
Roberto Cravallo 18 Mar, 2014
Hi Bob,

I just tried it again, same result. CFv5 definately does check on "required" even if the field is disabled. Doesn't look like I can upload my backup for you to check. It should be easy to test anyway.

Where do I report this bug? Or have you already done so? Is there a workaround you can think of?

Thanks for your thoughts on this,

Bob II
GreyHead 18 Mar, 2014
Hi Roberto,

Please ask Max using the Contact Us form above and linking to this thread.

Bob
Roberto Cravallo 19 Mar, 2014
I got a message from Max (via "contact us") and he fixed it. Don't know how to get the updste, but I am sure he will let me know.

Thanks for your help.
Roberto Cravallo 28 Mar, 2014
Max wrote back a while ago that he fixed this. Still does not work for me in the newest release. :-(
And no more mails/infos from Max. Double :-(
Matt2012 26 Oct, 2014
Hi Guys I have the opposite issue.

I want a disabled field to stay required.

I have user a fieldset showing user details but I want them to update their profile if it is out of date. So I show it as part of the form but with a link to update if incomplete or out of date. So if a phone number is missing and required I want them to update their profile but at the moment because the field is disabled it does not validate?
Max_admin 26 Oct, 2014
Hi Matt,

Why do you have the field disabled if its required ? a disabled field will post nothing, as if it doesn't exist, also the user can't edit its value!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Matt2012 26 Oct, 2014
I want to show the user what there current details are to make sure they update their profile if they are outdated. I guess I could just show them it in text above the form.

Name: John Smith
Email: John@..

Then submit those fields as hidden fields - although I would still want to make sure for example phone number is not empty?

The problem is this:

1. phone number is not required at registration but it is required to perform this form request.
2. I want them to update their personal details in the profile section of the site not in this form area.
Max_admin 27 Oct, 2014

I want them to update their personal details in the profile section of the site not in this form area.



But you are trying to set the field to required in this form ?🙂

Anyway, a disabled field can't be changed by the user, and so its logical not to have validation for it.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 27 Oct, 2014
Hi Matt2012,

If you set the inputs to Readonly then they will be visible and submitted but not editable. You can do this with readonly=readonly in the Extra Parameters box.

Bob
This topic is locked and no more replies can be posted.