Make a button visible and active based on a value read from a database record,

Show and enable a button based on a database value in ChronoForms 7.

Overview

The issue arises because the switch functions available in CF6 are not present in CF7, and some field types lack event options.
Use the 'Events' and 'Hidden' settings in the Interface section of the button control. Set the event to 'Toggle Shown' with the database variable as the 'If' value and 'Clicked' as the function. For fields without event options, wrap them in a Container area to apply the logic.

Answered
ChronoForms v7
Ni NickOg 15 Feb, 2021
I need to make a button visible and active based on a value read from a database record, With CF6 I would have used one of the switch functions, They are not available in CF7 of course
I have watched the You Tube 'Fields Events in ChronoForms7' and that seems to be on the right track - setting a button as hidden (and inactive) and showing and activating it when a radio button is clicked.

I can't work out how to do that based on the value from the database record - eg {var:go} = YES

How would I do that??
Nick
Ni NickOg 21 May, 2021
Answer
I have the answer now using the 'Events' and 'Hidden' options of the Interface section of controls.
Use 'Toggle Shown' as the Event and enter {var:someValue} as the 'If' value and Clicked' as the function

One extra - some fields - for example Custom|HTML - don't include events. Wrap such controls in a Container area.

Nick
This topic is locked and no more replies can be posted.