Hi Bob,
This is, I suspect, is a failing in my knowledge of PHP. But maybe not.
I want to dynamically populate a radio button from code rather than from a db read. I have been trying code like this
Where getInfoPickRenew returns a couple of names. So what I am trying to do is to define a model 'mdlCouple' and then insert two records into that model
M, Nick Ogbourne
P, Wendy Ogbourne
So in the end the model should look like
mdlCouple,M,Nick Ogbourne
mdlCouple,P,Wendy Ogbourne
and then use that in a radio button so
[attachment=0]4Bob00.png[/attachment]
Does that make sense? It is a PHP rather than a Chronoforms problem, isn't it?
Regards
Nick
This is, I suspect, is a failing in my knowledge of PHP. But maybe not.
I want to dynamically populate a radio button from code rather than from a db read. I have been trying code like this
<?php
$buttonInfo=getInfoPickRenew();
$form->data['mdlCouple']['pickWhich']['who']=$buttonInfo['M'];
$form->data['mdlCouple']['pickWhich']['who']=$buttonInfo['P'];
dump ($form->data);
?>
Where getInfoPickRenew returns a couple of names. So what I am trying to do is to define a model 'mdlCouple' and then insert two records into that model
M, Nick Ogbourne
P, Wendy Ogbourne
So in the end the model should look like
mdlCouple,M,Nick Ogbourne
mdlCouple,P,Wendy Ogbourne
and then use that in a radio button so
[attachment=0]4Bob00.png[/attachment]
Does that make sense? It is a PHP rather than a Chronoforms problem, isn't it?
Regards
Nick