FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
test submission successful but fields not in DB setup
#1
Hi

I was trying to link my external form with formtools but am running into issue as form fields are not visible in formtools while DB setup. I have earlier installed other forms successfully in formtool. Can someone tell what could be the issue? This form I do not have Label should I have them?

Sample Form code:

Code:
<form action="http://127.0.0.1/formtools/process.php" method="POST" data-form="validate">
              <input type="hidden" name="form_tools_initialize_form" value="1" />
<input type="hidden" name="form_tools_form_id" value="3" />
                    <dl class="field row" style=" margin-top: 5%; ">
                        <dt class="text"><input type="text" placeholder="Name" required="" id="username"></dt>
                        <dd class="msg"><span class="caret"></span>You filled this out wrong.</dd>
                    </dl>
                    <dl class="field row">
                        <dt class="text"><input type="email" id="mailid" placeholder="Email - preferably IIT student/ alumni id" required=""></dt>
                        <dd class="msg"><span class="caret"></span>You filled this out wrong.</dd>
                    </dl>
                    <ul class="field row"  >
                        <li class="picker">
                            <select id="campus" required="">
                              <option selected="">Select</option>
                              <option>XYZ</option>
</li>
</ul>

<div class="row centered" style="margin-bottom: 55%">
                        <p class="btn submit"><button type="submit" value="Submit" >Submit</button></p>
                    </div>
                </form>
Reply
#2
(I assume you have replaced the "real life" URL to the external form with 127.0.0.1 for this example? Right?)
The only thing I can see is that you're not using the standard "name giving" attribute on your inputs. You just use "id". Don't know if this is important, but it might be a problem...

So, this:
Code:
<input type="text" placeholder="Name" required="" id="username">
should be:
Code:
<input type="text" placeholder="Name" required="" id="username" name="username">

And at the end you're using the button tag instead of the input type=button.

Maybe this throws it off? No expert here... but these are the only issues I can spot.
Reply
#3
Hi, Have a similar issue. Am on version 2.2.5, have an external form set up - linked directly - (not with API). Test submission successful. But when I submit real data through my form, a record does gets created with default fields like submission id, date, IP etc., but none of the filled in data from the form gets updated in formtools tables. Have been struggling around this for last two weeks. A quick help would be appreciated.
Reply
#4
The form_tools_initialize_form hidden field tells Form Tools that the form data being submitted is to be used for the test submission. If you haven't, make sure you remove the line <input type="hidden" name="form_tools_initialize_form" value="1" /> after your test submission has been received successfully.
Reply
#5
Hi Alex, it is removed already. Also it is to be specifically noted that on submission a row / submission gets created without user data. Field size have been checked and found ok. Email also goes out with blank fields. Any pointers?
Reply
#6
Did you try mrGarvin's suggestion by including the name="name_field" ? Feel free to PM me with a link to your form and I can check it out.
Reply
#7
Hi, Still stuck up, tried all suggestions already. Even tried with small mini form with few fields, same issue. Test submission is successful and further submissions creates a record but the data does not get in to the forms. Any help would be appreciated.
Reply
#8
I think I know the problem now...
You have several errors in your form. When I made some changes to your code I made it stick in the database. This is what I ended up with:
Code:
<dl class="field row" style=" margin-top: 5%; ">
                        <dt class="text"><input type="text" placeholder="Name" required="" id="username" name="username" /></dt>
                        <dd class="msg"><span class="caret"></span>You filled this out wrong.</dd>
                    </dl>
  <dl class="field row">
                        <dt class="text"><input type="text" name="mailid" id="mailid" placeholder="Email - preferably IIT student/ alumni id" required="" /></dt>
                        <dd class="msg"><span class="caret"></span>You filled this out wrong.</dd>
                    </dl>
                    <ul class="field row"  >
                        <li class="picker">
                        <select name="campus" id="campus">
                          <option value="ABC" selected="selected">ABC</option>
                          <option value="XYZ">XYZ</option>
                        </select>
                      
</li>
</ul>

<div class="row centered" style="margin-bottom: 55%">
                        <p class="btn submit"><button type="submit" value="Submit" >Submit</button></p>
                    </div>

I have changed the following:
  1. First of all, you have left out the closing "</select>" after your select list. This broke the code entirely.
  2. Secondly, you didn't specify any option values to your select list.
  3. Third, I had to give your text fields a "name" attribute to make them work.
Now it works for me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)