disable validation event under designer not working

dnigra 20 Feb, 2015
I believe there's a bug in the Disable validation event in the Events tab under the Designer.

I am creating a form to handle domain name requests. Users can either request a new domain, modify some info about an existing one, or ask for an existing one to be deleted.

There are a few fields that uniquely identify the domain and these are always required. All other fields are hidden until the user chooses the action wanted.

If a new domain is requested, there is a lot of additional information that will be required.
If modify, those fields are optional, user can enter just the fields that need to be changed
If delete, nothing else is required.

I set up a simple test form with radio buttons for the action and a text field (organization name) which is hidden on load.

If the user selects New or Modify, it is shown. If Delete, it is hidden. These actions are set in the Events tab in the radio field itself. Works like a charm.

Organization name is set required "no" in the text field "organization name".

In the Events TAB under the Designer, I enable validation for organization name if the registration type is "New" and disable validation for organization name if registration type is Modify.
[attachment=0]enable-disableValidate.png[/attachment]

The trouble I find is if I change my mind - that is, if I first select "new" then select "modify". The organization name field remains required and I can't submit without filling it out.

If I make just one selection, then submit, it works as I expect. (so on load, select any option, it's shown if new or modify, only required on new). The problem is when I change my mind from new to modify.
Changing from New to Delete is OK.. the organization name field shows on New, is required, but on Delete gets hidden and is not required.

Here's a snippet of the page source showing the on change function.

[attachment=0]enable-disableValidate.png[/attachment]

Thank you for looking at this.
GreyHead 20 Feb, 2015
Hi dnigra,

Spaces aren’t allowed in HTML input names so neither 'organization name' or 'Organization name' will work. Please try with e.g. organization_name. I think that may be the cause of the problem here.

Bob
dnigra 20 Feb, 2015
Hi Bob,

The field name and id is org_name, the label is "Organization name". The choices I get under the Designer events tab are the labels, not the field id or name :?


[attachment=0]showField.png[/attachment]


[attachment=0]showField.png[/attachment]

Thanks, Deb
dnigra 20 Feb, 2015
I should say that I am using Chronoforms V5.0.4, the download from January 2015, in case that matters.

D.
Max_admin 21 Feb, 2015
Hi,

Now this is a confirmed bug and a fix will be included in the next update which should be ready in the next few hours hopefully!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
dnigra 23 Feb, 2015
Thanks, Max!

D.
dnigra 23 Feb, 2015
Hi Max,

I installed your release from this morning V5.0.7, but am still having trouble.

Same scenario, under the Designer events tab I have enabled validation if reg_type is New and disabled validation if reg_type is Modify or Delete.

Org_name is contained in a panel, org_info. Org_info is hidden on load. Under events in the reg_type description, org-info is shown on reg_type New or Modify and hidden on reg_type Delete.

If I set org_name to Required in its description, it is required for both New and Modify. It is hidden on Delete and not required.

If I set org_name to Not required on its description, it is never required, not for New or Modify or Delete.

Thank you again for working on this.

D.
dnigra 25 Feb, 2015
1 Likes
Hi Max,

I've installed the V5.0.8 release from Feb. 23, but I am still having the same problem.

If org_name is not required, it is never required, no matter which reg_type I select.

If org_name is required, and I make the right choice for reg_type, it works as expected: required for New, not required for Modify or Delete.

If I change my mind, though, and choose New, then choose Modify, org_name is required. Seems that once it's required, it's required........one exception....

If I choose Delete after any combo of New/Modify/ back and forth, it is hidden and never required when it is hidden.

The problem is changing my mind from New to Modify.

Are you still looking into this, or am I missing something?

Thanks for your help............ D.
This topic is locked and no more replies can be posted.