Fórum

web form validation is not working ???

thumbnail
chirag dashalaniya, modificado 11 Anos atrás.

web form validation is not working ???

Regular Member Postagens: 129 Data de Entrada: 21/12/11 Postagens Recentes
I try to implement client side validation using java script ,but it is not validate form input data in web form portlet in liferay

what i do is :

First In Portlet-ext.porperties i write this line to enable java script and then restart server

validation.script.enabled true

After Web-form configuration i right simple script

== Mobile No ==

var alphaExp = /^[a-zA-Z]$/;
if(currentFieldValue.match(alphaExp)) {
return false;
}else {
return true;
}
== Email Id ==
if (currentFieldValue.indexOf("@")>=0)
return true;
else return false;

then publish,but this is can't validate from data and form successfully sended!!

help me out...
thumbnail
Muradali Hasan, modificado 10 Anos atrás.

RE: web form validation is not working ???

Junior Member Postagens: 84 Data de Entrada: 27/07/10 Postagens Recentes
Hi Chirag,

May be you are using form submit object which submit your form.

you can do one think change submit type to button and call java script function on onclick() after validating your data submit form through java script.

document.<formname>.submit();
Timo Kurowski, modificado 10 Anos atrás.

RE: web form validation is not working ???

Regular Member Postagens: 240 Data de Entrada: 24/06/13 Postagens Recentes
I have the exact same Problem. Cant change the Button tho, since its a downloaded portlet that sits on the server where i cant reach its code. (Translation is horrible, too).
Edwin Buising, modificado 10 Anos atrás.

RE: web form validation is not working ???

New Member Postagens: 2 Data de Entrada: 05/02/13 Postagens Recentes
I have the same issue. Any developments?
thumbnail
Neetu Mishra, modificado 10 Anos atrás.

RE: web form validation is not working ???

Junior Member Postagens: 75 Data de Entrada: 21/05/12 Postagens Recentes
Hi All,

Please refer the below link:
http://www.liferay.com/community/forums/-/message_boards/message/15848474


Regards,
Neetu