/
step3.html
58 lines (51 loc) · 2.65 KB
/
step3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
layout: default
navPage: docs
heading: Adding a POST form
breadcrumbs:
- Tutorials,/tutorials/
- Adding a POST form
subnavSection: Adding a POST form
prev: "Step 2: Form Information,/tutorials/adding_post_form/step2/"
next: "Step 4: Database Setup,/tutorials/adding_post_form/step4/"
categories: tutorial
tags: basics
---
{% include open_section.html nav='nav_tutorial_adding_post_form.html' selected='step3' nav_width=3 %}
<p>
{% include screenshot.html item="i54.jpg" %}
The test submission page is where your form and Form Tools first make contact.
Form Tools works by waiting for a submission sent from your form that contains everything
you want stored. It uses this to build a custom database table for all future form
submissions. The benefits to building the database table this way are numerous, including:
reducing the likelihood of errors for entering form field names, reducing the amount of
configuration required and ensuring that your form and Form Tools are correctly connected.
</p>
<p>
Sending a test submission for POST forms is very simple. On the Test Submission page in
the Add Form process, select the direct method with the appropriate "SELECT" button. This
will display some further instructions in the page.
</p>
<ol>
<li>Cut and paste the HTML in the textarea and replace your own <form> tag with it.
The HTML will look something like this:
<textarea class="codemirror" data-lang="html">
<form action="http://www.yoursite.com/path/to/form_tools/process.php" method="post">
<input type="hidden" name="form_tools_initialize_form" value="1" />
<input type="hidden" name="form_tools_form_id" value="X" /></textarea>
If you indicated that this form would be used to upload files, you will see an extra
enctype="multipart/form-data" attribute. Note: if your existing form tag has other
attributes like name or onsubmit, feel free to add them to the generated code. The
important thing is that the method is set to POST and the action path is correct. The
<b>form_tools_initialize_form</b> hidden field tells Form Tools that the form data being
submitted is to be used for the test submission. The <b>form_tools_form_id</b>
hidden field is a unique number generated by the program to differentiate between the
various forms.
</li>
<li>
Now, return to your form in your browser and after refreshing the page, fill in all
fields and submit the form. Return to Form Tools and click the Refresh button in the
page, then continue to the next step.
</li>
</ol>
{% include close_section.html %}