Hi david,

Thank you for the solution. In my case there were some problems.

1. After the form got submitted I had an error: “We could not locate your form”. I have fixed it by wrapping shortcode on line 4 with do_shortcode() function:

$shortcode = do_shortcode(‘[gravityform id=”‘ . $form[‘id’] . ‘” title=”true” description=”false”]’);

2. The form become wrapped with .gform_confirmation_wrapper and .gform_confirmation_message classes, which caused the entire form become styled as confirmation wrapper (in my case confirmation wrapper have some specific background, font size and borders). To avoid this issue, I would recommend to add two closing and opening div’s on line 8 and move confirmation message to the top of the form:

$form[‘confirmations’][ $key ][‘message’] = ” . $form[‘confirmations’][ $key ][‘message’] . ” . $shortcode;