hide element in add page but show in detail page

burque98

Member
How to hide element in add page but show in detail page. I tried to use access settings, but element still appear in add page and not editable.
 
Got the email, I'm buried in some coding at the moment, I'll get to this just as soon as I can.

-- hugh
 
You can add custom CSS to your form template (e.g. bootstrap template)
#$form .fb_el_your-full-element-name {display:none}
 
Not an ideal solution, I know, but right now probably about the only solution. We've been thinking for a while about the best way of controlling visibility between form and details view, and may well add another set usergroup / access list based controls just for visibility, rather than "access".

-- hugh
 
Hugh just merged this pull request, you can update your code from Fabrik github:
https://github.com/Fabrik/fabrik/commit/0293c03ee0183cf2b7a2aed354ddafd7a71ab0ee

However, this one is ATM in group level. You find this in group Layout settings. Using this feature the only limitation for you is obviously that you should have some separate group(s) for elements that you want to hide from form view but show in details. So you can choose whether and how to show group in form/details/both. The feature itself is not a new one but since now it's possible to make a group just "hidden" (display:none) also separately in form or details view.

FYI - I made also first test of element level hiding options. If you want you can try this code (see link below). It works as expected but it's not ideal in admin UI side (and I have no idea whether Fabrik team will approve such approach).
When creating a new element you must first save it and then the option buttons appear in form (if the element is not internalid or timestamp). When changing element type in whatever reason from any other to internalid or timestamp you have to ensure before saving that Hidden? Yes is choosen. Not PR-ed yet but it's available in my fork:
https://github.com/jaanusnurmoja/fabrik/tree/hidden_field_opts
 
I would advise against running that forked code, as we wouldn't be able to provide any support for an installation which is running anything other than standard Fabrik code.

We'll be adding some way of controlling visibility separately from the basic access controls at some point. Until then, best approach is either the new group hide/show feature, or using custom CSS.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top