520 Server error when trying to pass form data to php variable

Dt Dtorr1981 21 May, 2015
Hi Guys,

i'm still new with chronoforms and have stumbled upon a problem while trying to pass a value to a php variable on form load.

I have a form which i am using to edit user details, on this form i have a link which will open a modal allowing me to email the user directly. However i cannot seem to pass the user_id to a php variable. It is appearing in the array on page load as:

Array
(
    [cont] => lists
    [ccname] => leadinfo
    [act] => edit
    [gcb] => 42
    [leadinfo] => Array
        (
            [id] => 42
            [uniq_id] => 
            [user_id] => 1001
            [created] => 2015-05-15 12:44:11
            [modified] => 2015-05-15 11:44:11
            [s_type] => 1
            [fname] => Annette
            [lname] => Curtain
            [school] => Leicester
            [class] => Street-Smart
            [t_num] => 
            [email] => 
            [activity_status] => 0
            [t_date] => 18-05-2015
            [conf_call] => 1
            [taster_conf] => 1
            [taster_attended] => 0
            [t_dns] => 0
            [button6] => Submit
            [hidden66] => 
            [addinfo] => None
        )

    [user] => Array
        (
            [id] => 1001
            [name] => Annette Curtain
            [username] => 
            [email] =>
            [password] =>
            [block] => 0
            [sendEmail] => 1
            [registerDate] => 2015-05-15 12:44:11
            [lastvisitDate] => 2015-05-15 10:42:27
            [activation] => 0
            [params] => Array
                (
                    [editor] => none
                    [timezone] => 
                    [language] => 
                    [admin_style] => 
                    [admin_language] => 
                    [helpsite] => 
                )

            [lastResetTime] => 0000-00-00 00:00:00
            [resetCount] => 0
            [otpKey] => 
            [otep] => 
            [requireReset] => 0
        )

    [id] => 42
    [user_id] => 1001
    [created] => 2015-05-15 12:44:11
    [modified] => 2015-05-15 11:44:11
    [s_type] => 1
    [fname] => Annette
    [lname] => Curtain
    [school] => Leicester
    [class] => Street-Smart
    [t_num] => 0123456789
    [email] => name@email.com
    [activity_status] => 0
    [t_date] => 18-05-2015
    [conf_call] => 1
    [taster_conf] => 1
    [taster_attended] => 0
    [t_dns] => 0
    [button6] => Submit
    [hidden66] => 
    [addinfo] => None
)


Now i want to pass the user_id field value (value is 1001 in this instance) to a variable called $userid but whatever im doing is wrong as everytime i try and assign it and output it through FirePHP, i refresh the page and am faced with a Server 520 error. What would be the correct way to assign this value to the variable?

Thank you in advance.

Donna
Dt Dtorr1981 21 May, 2015
Woohoo....it always seems that as soon as i post i find a solution. The solution is to use the model id also, i just found it hidden in some faqs when using google to search instead of the in built search function.

$userid = $form->data['model_id']['input_name']


Just in case anyone else has a similar issue.

Best Regards
Donna
This topic is locked and no more replies can be posted.