This question has been flagged
3 Replies
3876 Views

Hello,

How can i check the form's state in an XML view ?

I would like to hide all fields that are empty only in view mode for a custom module.

I've already tried with oe_edit_only and invisible attribute in field tag but i can't figure out a way to do it properly.

For example : if i have "toto" field. I would like it to be always visible in edit mode, and visible in view mode only if it's not empty.

I'll appreciate any help :)

regards.

Avatar
Discard
Author Best Answer

related post :  \Custom widget field - invisible if empty

Avatar
Discard
Best Answer

Azzedine

I think that this only could be do it with a custom widget to have that working, to be able to manipulate the dom on events at least to add a css class to the field label to hide it

Hope this help you

Avatar
Discard
Author

thank you for the response.

I'll try to make a custom widget then, do you know which class i'm supposed to extend ?