• Resolved hwuser

    (@hwuser)


    Hello,

    About hf_form_success hook, could you tell me what exactly contains the two parameters $submission and $form?
    Are they an array? Can you write what variables it contains?

    Thanks,
    Sergio

Viewing 4 replies - 1 through 4 (of 4 total)
  • Those are objects i believe. The hf_form_success hook is executed after all actions are done, so it may be too late to write anything back to those parameters.

    What are you trying to archive?

    Thread Starter hwuser

    (@hwuser)

    Hi,

    I don’t need to modify the parameters, I just need to know what values ??it contains.

    In any of the two parameters can I get the content of the message?

    Thanks

    Ah, I thought you meant to ask if it’s possible to write to these variables, but now I understand you want me to write what the variables are. ??

    The form contains everything related to the form itself

    $form           = new Form( $post->ID );
    $form->title    = $post->post_title;
    $form->slug     = $post->post_name;
    $form->markup   = $post->post_content;
    $form->settings = $settings;
    $form->messages = $messages; //success and error messages for the form)
    return $form;

    And the submission has everything related to what was submitted, I assume the $submission->data is what you are after?

    
    $submission  = new Submission();
    $submission->id           = (int) $object->id;
    $submission->form_id      = (int) $object->form_id;
    $submission->data         = $data; //array with the submitted form fields
    $submission->ip_address   = (string) $object->ip_address;
    $submission->user_agent   = (string) $object->user_agent;
    $submission->referer_url  = (string) $object->referer_url;
    $submission->submitted_at = $object->submitted_at;

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

    Thread Starter hwuser

    (@hwuser)

    Ohh great!!! maybe I explained myself wrong, I’m using a translator… thank you very much!!!!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Content of submission and form on hf_form_success’ is closed to new replies.