Creating first custom template
-
Hello,
I have tried to follow your instructions for creating my first custom template.
I have a question concerning the data fields
On your site you have a code that goes like this:
<?php foreach($lead_ids as $lead_id) { $lead = RGFormsModel::get_lead($lead_id); do_action("gform_print_entry_header", $form, $lead); $form_data = GFPDFEntryDetail::lead_detail_grid_array($form, $lead); /** Uncomment the following line when figuring out how to access the $form_data array */ //print_r($form_data); exit(); /* get all the form values */ $date_created = $form_data['date_created']; $first_name = $form_data['field']['1.Name']['first']; $last_name = $form_data['field']['1.Name']['last']; $address_street = $form_data['field']['4.Address']['street']; $address_city = $form_data['field']['4.Address']['city']; $address_state = $form_data['field']['4.Address']['state']; $address_zip = $form_data['field']['4.Address']['zip']; $address_country = $form_data['field']['4.Address']['country']; $phone = $form_data['field']['5.Phone']; $email = $form_data['field']['2.Email']; $website = $form_data['field']['3.Website']; $signature = $form_data['signature'][0]; /* format the template */ ?>How can I replace them with the code of my own form ?
I tried to look in the source code of my form and found
<input name='input_2' id='input_1_2' ...so I tried with $form_data[‘input_2’] and also $form_data[‘input_1_2’]
but it didn’t work :/Am I doing something wrong, or missing something ?
Thanks in advance for your help
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Creating first custom template’ is closed to new replies.