Fórum

Custom field validations

garima bhandari, modificado 11 Anos atrás.

Custom field validations

Junior Member Postagens: 81 Data de Entrada: 02/02/13 Postagens Recentes
I have added 4 custom field in liferay 6.1 for users( using control panel>>custom fields>>users>>add custom field)

One of them is check box and 3 are drop down. I want when user go custom field(control panel>>my account>>custom field) he should not be able to save the data if he has not checked any checkbook and not selected the value from drop down.

Can any one help me how to apply validations on custom fileds?
thumbnail
Gnaniyar Zubair, modificado 11 Anos atrás.

RE: Custom field validations

Liferay Master Postagens: 722 Data de Entrada: 19/12/07 Postagens Recentes
Hi,

You can validate the custom field by overriding CreateAccountAction through HOOK or EXT.

Hope this below link would resolve your issue:

Custom Field Validation
garima bhandari, modificado 11 Anos atrás.

RE: Custom field validations

Junior Member Postagens: 81 Data de Entrada: 02/02/13 Postagens Recentes
I know i can do this using hook. I want to know how to implement that for checkbox and drop down.
Do you know?
thumbnail
Gnaniyar Zubair, modificado 11 Anos atrás.

RE: Custom field validations

Liferay Master Postagens: 722 Data de Entrada: 19/12/07 Postagens Recentes
what is your issue for getting checkbox and select box values in your custom CreateAccountAction file as mentioned in that blog ?

if you want to get the client side validation, just use this jQuery


$("input[id*='chkBoxName']")..click(function() {

//alert("clicked checkbox")
// do your validation

})