I am needing to post a form with or without a file attachment to a Domino database from an ordinary html from on another server if possible, if not, on the same server. Has anyone tried to do this??
thanks
I am needing to post a form with or without a file attachment to a Domino database from an ordinary html from on another server if possible, if not, on the same server. Has anyone tried to do this??
thanks
Subject: Has anyone Posted to a Domino Database from an HTML Form outside of Domino?
There’s no magic to it – on the web, Domino doesn’t “know” where the HTML form originated. Just create a Domio form in Designer to match the HTML form you want to use – this will be used as the “CGI script” for your HTML form. After that, it’s a matter of making sure that your external HTML form’s attributes look like this:
Attachments can be a bit of a bother – the enctype is definitely not optional if you have any uploads. If in doubt, do an HTML preview from Designer of the form you created and look at the attributes for any file uploads () it creates. If everything matches, you really can’t go wrong.
If you need the form to have edit-and-continue capabilities, then make the query string for the action “?EditDocument&Seq=1”, then copy the HTML for your non-submit actions/buttons to your free-range HTML forms. You’ll also want to copy the _Click hidden field and the _doClick() javascript function.
In any case, the Domino form will be invoked when the HTML form is submitted. Any validation it carries will be used, along with any WebQuerySave code, and the $$REurn field will fire if the form submits successfully.
Subject: Has anyone Posted to a Domino Database from an HTML Form outside of Domino?
Yes. I had something similar. It was a credit card merchant approval from a bank. The way I set it up was to have the html form do a post to an agent. The agent parsed the Request_Content CGI variable and then acted on the data.
Steve
Subject: yes, the credit card company posts back to a form we have
Make sure you have all the fields on the Domino form that are being posted. I think the names are case sensitive.
You can also have a webquerysave agent defined on the Domino form to do further processing.
Posting to an agent is a bit harder since you have to parse the request_content cgi variable.
Howard