Prepopulate and capture URL string...
I really like form builder. I've searched for a good one for weeks, and it is the best I've found.
I've read a few posts about capturing the url in a form, but none of them work for my situation. So I'm hoping someone might be able to help.
I need to capture data in a url string in my form. I've inserted some php code in the top of the .html file that WFB creates and changed the extension from .html to .php. The php code looks like:
<!-- End of the headers for CoffeeCup Web Form Builder -->
<title>
Capture_note
</title>
<?php
$loanid = $_GET["loanid"];
$uname = $_GET["uname"];
$bname = $_GET["bname"];
$loanrecordid= $_GET["loanrecordid"];
?>
</head>
Then I go to the html form code and set the values of the fields to the $_GET variables, like this:
<div style="FILTER: " id="item8" class="fb-item fb-20-item-column">
<div class="fb-grouplabel">
<label style="DISPLAY: inline" id="item8_label_0">Borrower Name</label>
</div>
<div class="fb-input-box">
<input id="item8_text_1" disabled maxlength="254" name="borrower_name" data-hint=""
autocomplete="off" placeholder="" type="text" value="<?php echo $_GET['bname'] ?>" />
</div>
</div>
This all works fine and well, but when I hit submit, the form isn't creating a record in the mysql data base. Without the php code, the form builds and populates the tables. With it, it doesn't.
Any suggestions/guidance are very much appreciated.
I've read a few posts about capturing the url in a form, but none of them work for my situation. So I'm hoping someone might be able to help.
I need to capture data in a url string in my form. I've inserted some php code in the top of the .html file that WFB creates and changed the extension from .html to .php. The php code looks like:
<!-- End of the headers for CoffeeCup Web Form Builder -->
<title>
Capture_note
</title>
<?php
$loanid = $_GET["loanid"];
$uname = $_GET["uname"];
$bname = $_GET["bname"];
$loanrecordid= $_GET["loanrecordid"];
?>
</head>
Then I go to the html form code and set the values of the fields to the $_GET variables, like this:
<div style="FILTER: " id="item8" class="fb-item fb-20-item-column">
<div class="fb-grouplabel">
<label style="DISPLAY: inline" id="item8_label_0">Borrower Name</label>
</div>
<div class="fb-input-box">
<input id="item8_text_1" disabled maxlength="254" name="borrower_name" data-hint=""
autocomplete="off" placeholder="" type="text" value="<?php echo $_GET['bname'] ?>" />
</div>
</div>
This all works fine and well, but when I hit submit, the form isn't creating a record in the mysql data base. Without the php code, the form builds and populates the tables. With it, it doesn't.
Any suggestions/guidance are very much appreciated.
Did you make your own myformname.php script to process the data or are you using the one created by the form builder?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
@Eric,
I'm using the one that the form builder creates.
I don't know that I'd say I figured the problem out, but I did get it working. I had to do three things.
First, created a myforname.php copy of the myformname.html file. The .php file is where I have the $_Get for the url parameters.
Second, I moved the original .php file out of the folder it goes in and into the root directory of my webserver, in this case xampp, htdocs.
Third, and this is what was messing me up, I think, I used 'localhost' rather than the actual name of the server in the url string. That seemed to be what I was missing--not sure why that caused a problem, I'm all ears for thoughts on this.
So, now that I've got it working, does anyone know how to change the option on 'Upload File' dialog to allow multiple file uploads? The default setting is one file only.
Thanks!
I'm using the one that the form builder creates.
I don't know that I'd say I figured the problem out, but I did get it working. I had to do three things.
First, created a myforname.php copy of the myformname.html file. The .php file is where I have the $_Get for the url parameters.
Second, I moved the original .php file out of the folder it goes in and into the root directory of my webserver, in this case xampp, htdocs.
Third, and this is what was messing me up, I think, I used 'localhost' rather than the actual name of the server in the url string. That seemed to be what I was missing--not sure why that caused a problem, I'm all ears for thoughts on this.
So, now that I've got it working, does anyone know how to change the option on 'Upload File' dialog to allow multiple file uploads? The default setting is one file only.
Thanks!
Add another upload file element.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.