Hi,
Is it possible to create a form like:
1) Field1 - Load state: Parent hidden
2) Script (or something else) which check the follwoing sql-query
IF
SELECT Column1 FROM Table1 WHERE Column2 = 'value' = 1
Then 'Show parent' Field1
Else
End
This makes my form much more 'dynamic', because I can create a control panel to enable/disable fields without creating many forms.
Should be possible, but I need some help🙂
Is it possible to create a form like:
1) Field1 - Load state: Parent hidden
2) Script (or something else) which check the follwoing sql-query
IF
SELECT Column1 FROM Table1 WHERE Column2 = 'value' = 1
Then 'Show parent' Field1
Else
End
This makes my form much more 'dynamic', because I can create a control panel to enable/disable fields without creating many forms.
Should be possible, but I need some help🙂
Hi smurf007,
I don't know if it will work in CFv5 but in CFv4 I have used Custom containers to do this. You can add code in the Custom Start and end code boxes so that the container contents are either shown or hidden depending on some PHP. Here's a simple example. Start:
End:
Bob
I don't know if it will work in CFv5 but in CFv4 I have used Custom containers to do this. You can add code in the Custom Start and end code boxes so that the container contents are either shown or hidden depending on some PHP. Here's a simple example. Start:
<?php
$display = 'none';
if ( $form->data['some_input'] == 'some_value' ) {
$display = 'block';
}
echo "<div style='display:{$display};' >";
?>
End:
</div>
Bob
Hi,
Thanks for your answer. I got this error:
Parse error: syntax error, unexpected ';' in /public/sites/...(125) : eval()'d code on line 3
Any suggestions?
Thanks for your answer. I got this error:
Parse error: syntax error, unexpected ';' in /public/sites/...(125) : eval()'d code on line 3
Any suggestions?
This topic is locked and no more replies can be posted.