HideSubmit

From SMTX Wiki
Jump to navigation Jump to search

In order to hide the Review button , you need to have a read only display field, that holds this as value (the label should remain blank):

   <style>.button-review {display:none; !important}</style>

To make this dynamic, make another field that either holds 'none' or is empty to toggle between displaying the Review button or not. If you wonder why we simply create a section that contains the <style> element when you need to hide the button, here's why: You can place the <style> tag within a section, but also when the section is not opened, the <style> element will be part of the HTML code in the browser. For that reason, the toggle should not be done by opening or closing sections, but by dynamically changing the value behind display: to none.

In our example form, we start with a Yes/no field, if 'YES' is selected, we want to hide the button. internal label: CaseCheck


Then, we add a second field, internal label 'SetNoneValue'. This is filled based on the answer in the Yes/No field: IIF('#REPLACE-FORMFIELD-BlockSubmit||CaseCheck||#'='No',,'none')

Finally, the read only display field, called 'SetButtonStyle', has this value: <style>.button-review {display:#REPLACE-FORMFIELD-BlockSubmit||SetNoneValue||#; !important}</style>

Link to sample form : http://demo.smt-x.com/Forms/form.aspx?id=173. Login with demo/demo

If you want to hide the button in an external form in a process' action step, the class to toggle is diffferent. Class : <style>.button-continue {display:none; !important}</style>