Programmatically choose the group layout ?

lcollong

FabriKant d'applications web
Hi,

I'm using the regular boostrap_tabs template to show a form. One of the tabs is a repeated group displayed as a table coming from a join. Depending of the status of an element in the main table, I'd like the group being rendered as "fully editable" ("Yes" in the layout choice dropdown for that group) or "only view" ("Always show as read only").

I've tried to use the canedit list plugin on the list corresponding to the joined table but it is not triggered once joined (I had to test! :) )
I can't use canedit plugin on the main list as the row has to remain editable for the main row elements and the others tabs.

I've tried to duplicate the same join on the main table with the idea of having two identical tabs/groups. One editable, the other set as details only and modify the template to show one or the other group depending on the status element value. But the model is messed up by the two same joins (same labels/id I guess)... did not success

If there a way to programatically set the type of group layout before it is rendered (onBeforeLoad) ?

I'm afraid the only other solution would be to go to js. disabling everything on the group on load....

Any idea welcome.

Laurent
 
I can't think of a way off the top of my head, I'd have to set up a test and try and code it up.

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

Thank you.

Members online

Back
Top