12- validate-one-required in CF v2.5 RC2 for J1.5

gporterfield 06 Mar, 2008
The new release for Joomla 1.5 looks good. Backed up all of my forms, uninstalled the old version, installed the new, and restored all my forms. Everything works fine except for one small issue.

On one form I have three text boxes listed in "12- validate-one-required." With the previous version, this functioned properly allowing me to enter data in just one of the 3 boxes. Now it is requiring entries in all 3 boxes.

Is this a bug, or do I need to rebuild the form in the new version due to some other change impacting this validation?

George
Max_admin 06 Mar, 2008
Hi George,

The validation part is not changed at all, do you use the same library ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
xpla 07 Mar, 2008
I can't get validation to work. It ignores the set fields in Joomla-backend. I use the latest version.
GreyHead 07 Mar, 2008
Hi xpla,

Do you have the validation library set to 'mootools'?

Bob
xpla 07 Mar, 2008
Yes, i can see the following line in my sourcecode of the page:
<script src="/v3/components/com_chronocontact/js/mooValidation.js" type="text/javascript"></script>


I also tried to call the mootools itself additional to the line above, but didn't work.
Max_admin 08 Mar, 2008
hi xpla,

what about other validation rules ? like required or email, please give them a test and let us know, the validation part was left as its, so all should be the same, but please let us know about the other rules working or not!

Cheers,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
xpla 08 Mar, 2008
Doesn't change anything, but maybe we should go a step back, how should source code look like with validation working? Can somone post the sourcecode of <form> to </form>?
xpla 08 Mar, 2008
Well i think the problem is quite simple, there is no onsubmit action in the sourcecode, but i can type in what i want in backend, no unsubmit is shown in page-sourcecode, it's getting totally ignored.
xpla 08 Mar, 2008
<form name="ChronoContact_such-a-name-message" id="ChronoContact_wm-sounds-message" method="post" action="index.php?option=com_chronocontact&task=send&chronoformname=wm-sounds-message" enctype='multipart/form-data' onSubmit="return checkForm(this)">
xpla 08 Mar, 2008
Ok i tried it with other calls like "validate(this)" or so on, maybe i use the wrong call for the function.
xpla 08 Mar, 2008
Maybe someone can post a little FAQ or HowTo on validation with J1.5 and the new backend-tab ...
Max_admin 09 Mar, 2008
Hi xpla,

Please clarify, Please remove all the validation you have and only set one field to "required", does it work ?

for the validation to work fine in Joomla 1.5 you must have "mootools" as the chosen library and the validation enabled, thats all, I just test this here now and its fine!

Please answer my question above and lets start from there!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
xpla 09 Mar, 2008

hi xpla,

what about other validation rules ? like required or email, please give them a test and let us know, the validation part was left as its, so all should be the same, but please let us know about the other rules working or not!

Cheers,

Max



I tested it like you told me in this and in the post over this one and no validation takes place, i can read about this issue in german boards too that people can't get validation to work.
GreyHead 09 Mar, 2008
Hi xpla,

I'm very confused about what your problem is? I know that it's about validation - but are you using ChronoForms validation? Or adding your own script?

If you are using ChronoForms validation then you don't need any OnSubmit entry. Just set the Validation tab to 'Yes' and 'mootools' plus the fields you want to validate.

If you are using your own validation then the usual problem is that you need to identify the form correctly. I think that there is a FAQ about this.

You asked for a sample form. Here is the source code of a validated form. (This is *not* what is entered in the Form Manager).
<script src="/joomla1.5/components/com_chronocontact/js/mooValidation.js" type="text/javascript"></script>

<form name="ChronoContact_MyForm" id="ChronoContact_MyForm" method="post" action="index.php?option=com_chronocontact&task=send&chronoformname=MyForm" >
  <input name="email" class="required validate-email" type="text" id="email" size="25" maxlength="35" value="" />

<input type="submit" name="Submit" value="submit"  />
</form>
<script type="text/javascript">
  function formCallback(result, form) {
    window.status = "valiation callback for form '" + form.id + "': result = " + result;
  }
  var valid = new Validation('ChronoContact_MyForm', {immediate : true, onFormValidate : formCallback});
</script>
Bob
xpla 09 Mar, 2008

... If you are using ChronoForms validation then you don't need any OnSubmit entry. Just set the Validation tab to 'Yes' and 'mootools' plus the fields you want to validate. ...



This doesn't work! No validation takes place ...<br><br>Post edited by: GreyHead, at: 2008/03/09 13:37
GreyHead 09 Mar, 2008
Hi xpla,

Yes it does work. If it's not working on your form, then we need more information to help find out what is happening.

Neither Max nor I read minds. If you want help, please answer our questions and give us some useful information to work with.

Bob
xpla 09 Mar, 2008
Sure you can't read minds, but should i read your mind, what information you want?

I answered all your questions and i did how you tell me. So what information do you need, should i repeat what you told me to do and tell you this as an information or what else do you need?

Please specifiy what you need as information ...

Maybe i should write that i don't use an own script for validation but i think if i quote your advice and say it doesn't work, i hope it's clear, that i don't use own scripts ...

So please tell me what you need and i'll provide you with any information required.<br><br>Post edited by: xpla, at: 2008/03/09 14:24
GreyHead 09 Mar, 2008
Hi xpla,

I know that it's about validation - but are you using ChronoForms validation? Or adding your own script?

Not answered! at least not until your last post. It's not at all clear once you start talking about OnSubmit scripts.

Please clarify, Please remove all the validation you have and only set one field to "required", does it work ?

Not answered.

So more questions for you.

Is the site on line? Can I see it?

And, please make a Form Backup from the Forms Manager and post it here or email it to the address in my sig.

Bob<br><br>Post edited by: GreyHead, at: 2008/03/09 14:50
xpla 09 Mar, 2008
Sorry for the troubles, i tried all what you told and other things too ...

So i can answer every questions with >> yes, tried, didn't work.

You got mail.
GreyHead 09 Mar, 2008
Hi xpla,

Thanks, we need to know that you've tried . . . not everyone does.

And thanks for the email (we found it was a problem with classes).

Bob
jvince 10 Mar, 2008

Hi xpla,
Thanks, we need to know that you've tried . . . not everyone does.
And thanks for the email (we found it was a problem with classes).
Bob



Hi Bob,
Is the problem with classes related only to xpla or for all chronoforms users?

Thanks,

- Vince
GreyHead 10 Mar, 2008
Hi Vince,

It's not unique to xpla. The Validation that ChronoForms uses depends on using JavaScript to change classes in the form tags (input, select, etc.). If you put a class in there as well the two get confused.

So, no problem s long as you don't add classes to form input fields. You can still do css by wrapping the fields in labels or divs, they aren't affected.

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