Forums

Auto server side validation problem

jeffnco 16 Jun, 2011
Hi
I have probleme with auto validation server side and as well with js validation.
I can't make it work.
I've read many post but found no issue .
I have a custom html form.
In action, on submit box i put auto server side validation and wrote my field separate by comma in the required field.
In my html form i wrote


<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Nom *</label>
    <input class="validate['required']" maxlength="150" size="30" title="saisie obligatoire" id="nom" name="nom" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>


I am used to cf v3 and with v3 we just have to put "required".
Well anyway with what i wrote on my form validation doesn't work.

Am i suppose to put a field for the error message behind my field ? (in v3 if you don't put a field for the message error it still written "saisie obligatoire" (in french) or "required field")

Where can i find some explanation with the big difference between cf v3 and V4, something who could help to understand the new way it works ??? (i've read some tutos but didn't find about it, or other problem as well.)

thanks

jeffnco

edit : I've already went into js validation setion and activated it, put it "on submit, on blur".
I've put a load js box in on load box.
Well my form :

on load :
load js
load css
show html

on submit :
auto server side validation
custom code
email
db save
thanks message
debbuger
jeffnco 20 Jun, 2011
Hi,

I answer to myself, it could be useful.
first my form is a custom form in html and the wizard is like this :




First i've tried to put the class of field in the custom code like this : class:"validate['required']" while i put in the assv box in the required field, all the fields i needed to be required.
=> didn't work for me.

So after struggling some hours i've tried to put the fields separate with comma in the no empty field in the assv box and whet ? => that's work.

So i've decided to delete all my class in the custom code (where it was written class:"validate['required']" ) and tried to copy my fields name from the no empty field to requeired field => dont work .

So I think when you use the assv box you must not put the class (validate ['what you want'] ) in the custom code to work.

Well if somebody can tell me if i'm right or not because i'm not sure about my conclusion (even if that works for me ).

For the JS validation, i don't use jquery but i 've put the jquery no conflict code without success. (I precise that for js validation, i had put the class="validate['required'] code on my field with the error message for each field in the custom code.)

Well i was used to cf v3 and i'm quite struggling with v4 because it has changed so much.

Hope it could help or somebody give some better explanation that will help as well.

thanks

jeffnco
Max_admin 20 Jun, 2011
Hi jeffnco

There is no relation at all between the ASSV and the required class because the 2nd is client side validation, when you say "doesn't work", you mean the server or client side validation ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
72dpi 21 Jun, 2011
Hiya, Yeah, i had the same exact problem.

i think there may be a bug in V4, (the "required" validation wasn't working on textarea, textfields, but was for checkboxes and radio elements.... odd.....

Ok, as a test, grab all the fields you had saved in the "required" fields of your "on Submit - Auto Server Side validation" settings, and put them into "not Empty" as I have.

Also, make sure your custom form has a "handle arrays" action somewhere in the "on Submit" area of the configuration.

Good luck!

[attachment=0]validation-1.gif[/attachment]
jeffnco 21 Jun, 2011
Hi
and thanks for answer.

@max : when i say "doesn't work" it's the required field of the assv, so server side, and as said 72dpi, we have to put the field in no empty box to make it work.

But the "required" class, which is for js validation so client side validation, doesn't work for me :
I put the class in the custom code in the inputs, i put the error message, i activate js validation in cf admin, i put it "on submit, on blur" and nothing is validate.
As i said before i allready put the code for jquery even if i don't use it in my website.

@72dpi : why i need a handle array in the onsubmit box ??
Is it the handle array which allow the data to be validate as shown in the assv box : "these fields should exist in the data array in order to pass this check."

thanks at all.

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