• Resolved acharseth

    (@acharseth)


    Hi!

    I am not able to make the sample you gave me (ref topic “How to avoid escpaced unicode”) to work so I have made the following code to debug:

    <?php
    /*
    Plugin Name: ACH hf-forms extention
    Description: Extention of the HTML-forms pluging to copy sumbission to a table
    Version: 0.2
    Author: Arne H?rseth
    */
    add_action( ‘hf_form_success’, function( $submission, $form ) {
    global $wpdb;
    $wpdb->insert( ‘Loppehenting’, array( ‘Kommentar’ => $submission->data, ‘Hva’ => $form ) );

    }, 10, 2 );

    When I run this the html form gets populated into the column ‘Hva’ but ‘Kommentar’, containing value of $submission is empty!
    What am I doing wrong?

    Arne

Viewing 1 replies (of 1 total)
  • Hi,

    It seems to me $submission->data contains the complete $_POST array, so you probably want to add the field name that you want the value of there.

    Hope that helps. If you have any questions, please let us know!

Viewing 1 replies (of 1 total)
  • The topic ‘Empty $submission on action hf_form_success?’ is closed to new replies.