Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So my script is simple right now just to test out the $entry field id's.

add_action("gform_after_submission_3", "set_post_content", 10, 2);
function set_post_content($entry, $form){
$subject = $entry["28"] . 'Applied as: ' . $entry["2"];
 mail( $emailremoved, $subject, $message);
}

Right now entry 28 is a dropdown, this one returns the selected value.

Entry 2 is the name field with split first and last. This returns nothing. Ive also tried $entry["2.1"] and get nothing.

Entry 34 (not added) is a multi checkbox. This value is not echoed out either.

This is a multipage form, but that shouldnt matter.

Any ideas why the values are not returning? They are saving to the form entry.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

To debug you should print what's in $entry.

echo '<pre>' . print_r($entry,true) . '</pre>';
die();//You may need to kill the script to view..

Or email to yourself in your current mail function.

$message = '<pre>' . print_r($entry,true) . '</pre>';
share|improve this answer
    
Thanks a lot. I was so fixated on the single inputs that I didn't think to print them all. Thanks again for the help –  David Hechler May 30 '12 at 15:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.