acrobat pdf submit button for forms - fields order in xfdf - forms

My solution:
User opens PDF file on web server in browser.
User is entering form fields and pushing submit button.
Submit button sends XFDF data through POST to my PHP script.
When I get POST data, form fields are in random order.
I'm creating XFDF document based on POST and then process it further. Preferably fields should be in the same order as in PDF file.
Question:
I don't know how to control adobe reader to send form data in some predictable order. Form fields numbering (controlling flow of document when using TAB) is not changing resulting POST data order.
Any ideas how to order fields?

Related

Load data saved in form on a new form

I need to use Orbeon Forms to create a form to capture the price from a number of things. I create a form, connect it with database (MySQL), deploy the form, complete the form, and it saves the data correctly in database.
Then my question is: if I complete form_1 and save the data in the database, and later enter to the empty form_1:
Is it possible to load the data entered previously or from the last form completion for form_1?
Is it necessary to have button or any control to take an action?
When you load a page to fill a new form, notice how the URL ends with /new. When you are on that page, and save, notice how the URL changes to /edit/123 (where 123 is a long unique identifier). You can come back to edit the data by loading again this URL.
In practice, this is often done by going to the /summary page for the form, and clicking on the relevant form data you want to edit.

HTML form in 2 pages and submit on second page - how to achieve?

I have 2 jsp pages with forms and in first jsp page, once the user fill the form then they will click on 'continue' button and in the second page they have to enter data for few more form fields and do submit. once they do submit then data from 1st jsp and 2nd jsp need to be updated to backend. My question how i can submit the form in second page with first page data included
Store the user input from the first form in <input type="hidden"> in the second form. If there are are file inputs, then you'll need to store the file on the server and include some kind of reference (like a unique id or a URL) in the input.
Alternatively, you could use a session (but that risks a race condition if the user fills in two copies of the form at the same time across multiple tabs in their browser).
Alternatively, you could store the data in its final destination (e.g. a database table) with a flag on it marking it as a draft. Then update it with the rest of the data and remove the flag when the second form is submitted.

iTextSharp edit generated PDF and save back to database

I have process that I want to do that I'm not sure it is possible. I am using iTextSharp to generate and populate a PDF with collected data that a user has entered in a previous screen.
Then the PDF is saved to a SQL Server Database as binary data. Then it is pulled back for the user to view in the browser if they would like too.
It is possible to generate the PDF, do not flatten the form, and then allow the user to edit areas that may have not been prefilled by the users information. Then I will need to be able to save this back to the database.
I have some findings on using a adobe submit button that submits the pdf to a URL that would collect the data, but I want to know if iTextSharp is capable of this. Using ASP.NET or another example.
I do not want to save the form field information, but save the whole pdf to the database with some sort of submit button.

Blue Imps jQuery file upload send files with form like normal field

Is it possible to send file with form as normal file upload? When I check a file field it is always empty, and I need to send it with form data in one call. IS that possible?
There might be better answers out there, but I ended up solving this by following steps.
Having 2 forms on the page. One for file upload and one for other form data.
Format both forms using CSS so that user gets look and feel of one form.
Have only one div (which looks like button) to submit. Hide the actual form's submit button, if you are using them (I don't. Because I preprocess data and then send by ajax)
Once user submits forms (by clicking the dummy button), Using JS programatically click the file upload button.
Optional Once that call is finished, if there are no errors only then continue.
Submit the form with other form data.
The advantage I had in this approach was that I could have more control over user's form data as well as my file upload's settings. Because I had some settings (like max number of files and max file size) were dependent on user's form entry.

Create a fillable PDF that POST's it's data then returns a flattened PDF with the data in it the user can save

I have a pdf that currently people fill in, print out, hand to a receptionist who scans the paper form into a pdf, enters the form fields into a web form, attaches the scan to the web form and submits that. This is dumb.
What I want is a PDF form that once filled out the user can press a submit button. That submit button sends a post request to a web server with the form fields and the completed form. So far I can do half of that, submit the fields to a web site where they show up in POST, and the server's response gets returned to the user as a PDF, at least in Acrobat pro it does. Reader throws an error, but I am hoping that if the server returns a PDF reader will open it.
What I need is the submit button to send the fields to the server, along with a copy of the completed form. I can catch it with PHP and do everything I need from there. Preferably I would like both in the same transaction, but if not I can work around it.