Pass smartform data to a website as HTTP POST


Badge +2

Hi all,

 

How would I go about passing user input data from a smartform to another website as HTTP POST?

For example a smartform has 5 controls; 2 labels, 2 text boxes and a button. 

 

[Label:name=FirstnameLbl, Text="First Name"]       [Text box: name= FirstnameText]

[Label:name=SurnameLbl, Text="Surname"]            [Text box: name= SurnameText]

[Button:name =SubmitBtn, Text="Submit"]

 

These controls are mapped to a SQL SmartObject. 

 

The desired outcome is, when SubmitBtn is clicked

(1) Then the data in FirstnameText and SurnameText is written to the database with smartobject Create method. No problems here :) 

(2) Then the data in FirstnameText and SurnameText is sent by POST <form action="http://[domainthatisexpectingmypost].com"  method="post">

 

I've thought about creating the whole form using the HTML literal, but I can't see how I would then pass the user input values from the HTML form to the SmartObject. 

 

Any idea will be appreciated.

Thanks

Craig


2 replies

Userlevel 1
Badge +8

Craig

 

I would look at creating a customer service broker that calls a web service to do the post for you. You can then create a smartobject from this and call this from your form. Not straight forward but perhaps the neatest approach.

Badge +2

Hi Andrew,

Thank you for replying. 

 

I understand the process you have descirbed, but I have a bit of learning to do before I can implement it. 

I may be back with more questions....

 

Craig

Reply