I have the form already and collects data, profile_ph, profile_address, profile_emconph, profile_emconnm, and the usual other fields auto populated, and the chronoform auto captures the user id that completes the form to the user_id field.
I want the member to be able to click on the web link that they used to fill in the form, but with their data so they can edit it if they need to and then resave it.
I just can't get the user_id filtering bit working in chronoform V6. Ive tried the CC code from other posts:
<?php
$user = JFactory::getUser();
$form->data['user_id'] = $user->id;
?>
with this in the RD:
<?php
return array('id' => $form->data['user_id']);
?>
and all iterations of it, but with a Model name keeps coming up as the error, or some other error.
Im even happy to build it into CCv6, and can call the data in that already, but only for the individual by putting a filter into the 'Where Condition' for the DB Read, something like:
Profile.user_id:546
Basically filtering per user, but need it to read from the logged in user automatically and adjust that condition.
Even tried Profile.user_id:$user, obviously wrong, but don't know any better.
Thanks in Advance.
You would have though I would have tried that considering the questions I had alread asked re other issue, but didnt even occur to me.
Last one on this (I hope)
I can get the results to return now, can see that in the debugger, and can load them into a CCv6 table to view, but am trying to get them to reload into the CFv6 form fields.
I know its just a simple issue but can't see it.
In the name field for the text box I've tried, Profile.phnumber, Profile[phnumber], read_data4.phnumber, read_data4[phnumber] or just phnumber,
Just cant get the reload!!!!!!!
Profile being the Model, read_data4 being the Read DB function, phnumber being the DB field to read. I know the data is lading to the page, can see it in the debugger. Im missing something real simple I'm sure.
{var:read_data4.Profile.phnumber}
into the name filed of the text box, still nothing. Pic of debugger:
Thsnks a Tonne again, they owe you a payrise.
I take donations though haha
Paypal.me/healyhatman
Got it all working, reading, writing, get the data from all the tables, then, I get duplicate records each time I hit Save Button. No probs, dropped in a hidden field into the form, loaded the AID into it using {var:read_data4.Profile.aid} in the value, named it the same as the field 'aid' so it writes back to the table and uses the same entry, but I get a 'Duplicate Copy' error for the AID.
Again I know its going to be simple but I'm missing it.
