Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
gary b
Custom field validations
15 de Fevereiro de 2013 22:33
Resposta

gary b

Ranking: Junior Member

Mensagens: 62

Data de entrada: 2 de Fevereiro de 2013

Mensagens 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?
Gnaniyar Zubair
RE: Custom field validations
15 de Fevereiro de 2013 22:42
Resposta

Gnaniyar Zubair

Ranking: Liferay Master

Mensagens: 603

Data de entrada: 19 de Dezembro de 2007

Mensagens 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
gary b
RE: Custom field validations
16 de Fevereiro de 2013 05:42
Resposta

gary b

Ranking: Junior Member

Mensagens: 62

Data de entrada: 2 de Fevereiro de 2013

Mensagens 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?
Gnaniyar Zubair
RE: Custom field validations
16 de Fevereiro de 2013 05:56
Resposta

Gnaniyar Zubair

Ranking: Liferay Master

Mensagens: 603

Data de entrada: 19 de Dezembro de 2007

Mensagens 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

})