2

In my ektron application I have created an html form which is mapped to dXh. Can I customise the post back message in my html form with the message which is returned from my dXh connector? Am I able to do it or not?

Sudha
  • 2,078
  • 6
  • 28
  • 53

1 Answers1

1

I doubt you'll be able to. Data sent to the DXH from form submissions is done asynchronously so as to not cause delays on your site, particularly in case something is going wrong (e.g., someone shut down the DXH server). Because it's asynchronous, the form isn't waiting for a response from the DXH in any way. So even if there were a way to use that data, you likely would end up with a lot of false negatives if the DXH is receiving data slightly slower than the form postback is rendering.

What you can do is customize the postback message with information submitted through the form because that data is posted back to the server. So if you have a name field in your form, you could customize the postback message with "Thanks Sudha!"

To do that, you would just use Request.Form("fieldname") to retrieve the value as you would with any other HTML form.

egandalf
  • 898
  • 5
  • 8
  • Thank you egandalf. I have 1 doubt where I need to add Request.Form("fieldname"), within the form itself (in the post back message part?) – Sudha Jun 23 '14 at 09:09
  • I've not tested, but it should be something you can do on Init or Load, using Page.IsPostback. – egandalf Jun 30 '14 at 12:30
  • Init or Load of which page? Because when I go with form mapping I'm not using it in a physical page. Im using it in a pagebuilder page selecting via a contentblock widget; – Sudha Jul 01 '14 at 06:49
  • In that case, see documentation here: http://documentation.ektron.com/cms400/v9.10/Reference/Web/EktronReferenceWeb.html#Content/HTML_Forms.htm Go to section: Managing Form Responses > Creating a Postback Message – egandalf Jul 02 '14 at 12:38
  • I have another doubt..Please give me some insight on this,Can I write an extension method for the form mapping submit event? (like achieving login extension in OnAfterLogin method) – Sudha Jul 03 '14 at 10:05