0

I have created this page that has a form that allows users to submit a short wish in a text field. Once submitted share links show. Now the problem I am trying to solve is I want to get the text the user put in his wish and output it as a value inside my share link so they can share the wish on social networks. I am struggling and I am not even sure this code is right:

// Fetch Santa Wish Form field
add_action("gform_after_submission", "after_submission", 10, 2);
function after_submission($entry, $form){
    $form ='3';
    $wish = $entry["4"];
    return $wish;
}

If this code is right, how do i make it output the wish they just made?

1 Answer 1

0

I would use a Gravity Forms text confirmation. It will allow you to pull the field value of the Wish field via merge tags. And you can create your share links in the same confirmation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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