Form after submit

Dmitriy Nenazhenko asked on June 24, 2016 13:16

Hi we have a form that works in pop up. When user submitting form, we need to show "Thank you" layout. In General tab we have an option to show "Display text", but it generates , so we can insert only simple text. How can I insert some html layout after form submit? As an example: <h1>Thank you</h1> Thank you for interesting in our event....

Correct Answer

Jan Hermann answered on June 24, 2016 14:12

Now I understand. It's worth to try the workaround with resource strings and if it doesn't help, then you can customize the \CMSWebParts\BizForms\bizform.ascx.cs file.

You could also try to write a custom macro that returns the thank you message and place it into the Display text property.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Jan Hermann answered on June 24, 2016 13:33 (last edited on June 24, 2016 13:59)

The Display text property can hold HTML markup so you can simply copy your message there as it is. If it is too long for that field, you can take advantage of resource strings, add a new resource string within the Localization application and then same localization macro in the Display text field.

0 votesVote for this answer Mark as a Correct answer

Dmitriy Nenazhenko answered on June 24, 2016 13:40 (last edited on June 24, 2016 13:42)

But we can not paste into <span> some tags like <div> and so on. And if we look html that CMS generates we can see <div id="p_lt_ctl05_pageplaceholder_p_lt_ctl01_RegisterOnEventForm_viewBiz_pM_pMP"> <span id="p_lt_ctl05_pageplaceholder_p_lt_ctl01_RegisterOnEventForm_viewBiz_pM_lS" class="InfoLabel"> Thank you</span> </div>

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on June 24, 2016 14:02

Kentico processes them and add those IDs, but it shouldn't prevent you from styling them as you need. Alternatively, you can edit the web part itself and add your custom logic there.

0 votesVote for this answer Mark as a Correct answer

Dmitriy Nenazhenko answered on June 24, 2016 14:08

The point is not about IDs, but in HTML semantics. If I paste <div> into "Display text" CMS generates

<span ID="bla bla bal" class="InfoLabel">
    <div>Thank you!</div>
</span>

And this construction contradicts to html standard.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on June 24, 2016 20:21

Hi Dmitriy, another way for the post back is to create a thank you page which you can strip the page nesting, so it looks like a stand along page. You will have more control on that, even insert images as well. Then in the Form general property, set the post back to redirect to /thankyou page.

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on June 25, 2016 06:00

@Rui: I suppose Dmitriy needs the thank you message within the modal popup -> that's why I didn't suggest redirection to another page where he could format it.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.