I have an issue with passing data from CF5 to a where clause in CC5.
I've read the related FAQ and I just can't nail it. The basic scenario is:
* CF5 form with model 'constants' and a drop down constants[host]
* Calls the index action on a CC5 connection with model constants
All works fine without any conditions and the entire table is returned. Similarly, if I hard code a where condition I can filter the results.
However I want to use constants[host] passed from the form, so I do:
Nothing is displayed. I've tried about 15 different formatting approaches just in case.
If I throw in a showstopper to prevent the call to CC5 and echo $form->data['constants']['host']) it displays as expected e.g. host.domain.com. However output from the CC5 debugger shows that the condition being executed is "WHERE `constants`.`host` IS NULL". So basically the the form data isn't being passed over.
I'm stumped. Can anyone shed some light on this?
Regards
John
I've read the related FAQ and I just can't nail it. The basic scenario is:
* CF5 form with model 'constants' and a drop down constants[host]
* Calls the index action on a CC5 connection with model constants
All works fine without any conditions and the entire table is returned. Similarly, if I hard code a where condition I can filter the results.
However I want to use constants[host] passed from the form, so I do:
return array('constants.host'=> $form->data['constants']['host']);
Nothing is displayed. I've tried about 15 different formatting approaches just in case.
If I throw in a showstopper to prevent the call to CC5 and echo $form->data['constants']['host']) it displays as expected e.g. host.domain.com. However output from the CC5 debugger shows that the condition being executed is "WHERE `constants`.`host` IS NULL". So basically the the form data isn't being passed over.
I'm stumped. Can anyone shed some light on this?
Regards
John