• Resolved crafto

    (@crafto)


    Hello everyone, after resolving one problem, there’s always an other one hiding behind haha (but not on the same scale at least).

    So before you tell me this, I know there was a topic about the same subject : https://www.ads-software.com/support/topic/get_posted_data-return-array-and-not-selected-value-in-dropdown-select/
    But it didn’t helped me for my case and I couldn’t find anything on the web after browsing for 20~30 mins (either my research are very bad or there’s nothing) and this topic got left for now 7 months ago.

    So in my case, the problem is when I’m sending an email via my php function here :

    function action_wpcf7_before_send_mail( $contact_form ){
    	if($form_id = 11057){
          $submission = WPCF7_Submission::get_instance();
          $posted_data = $submission->get_posted_data();
          if( $posted_data['checkbox'][0] ) {
    				$to = $posted_data['email'];
    				$subject = "Meeting recap";
    				$message .= "Date and Time of the meeting: ".$posted_data['radio']." à ".$posted_data['hour']."h

    For the $posted_data[‘radio’] and the $posted_data[‘hour’], I’m having “Array” written in the body message instead of what the user select.

    The $posted_data[‘radio’] is from a radio tag of course, as for the [‘hour’] one, it’s from a select tag. I also don’t understand why the radio returns me an array when it is not one.

    Hope I was clear with what I want and my explanation, thank you in advance for your replies!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘posted_data returns “Array”’ is closed to new replies.