I have a complex set of forms using a ValuesManager, split across multiple tabs and layouts with a number of different showIfConditions of various fields. I need to support a "display only" mode where those same forms can be used to display the data without allowing updates.
I'd like to leave the existing form creation code remain unchanged and for display mode simply change all of the FormItems to type StaticTextItem. I've tried iterating over the Forms and FormItems and calling FormItem.setType("StaticTextItem"). I've also tried iterating over the Forms and setting each FormItem to a new StaticTextItem using the original FormItem's name. Neither of those has any effect.
Is there a way to reuse these edit forms in a display only mode?
I'd like to leave the existing form creation code remain unchanged and for display mode simply change all of the FormItems to type StaticTextItem. I've tried iterating over the Forms and FormItems and calling FormItem.setType("StaticTextItem"). I've also tried iterating over the Forms and setting each FormItem to a new StaticTextItem using the original FormItem's name. Neither of those has any effect.
Is there a way to reuse these edit forms in a display only mode?
Comment