Home › Forums › Quform WordPress › Dynamic Population of Fields Stopped Working
- This topic has 2 replies, 2 voices, and was last updated 11 years, 3 months ago by Ally.
- AuthorPosts
- August 13, 2013 at 8:30 pm #5786lawrencepepperParticipant
Hello, not sure what has happened but I am pulling my hair out trying to fix this. I have a form that was being populated by a query from data in my WordPress database. It has been working fine then all of a sudden it stopped populating the fields. Sometimes one or two populate, other times none. Nothing has changed with the code.
The code for the page:
<?php$rnumber = $_SESSION['iphorm_10']['iphorm_10_3'];
$con = mysql_connect("localhost","user","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("edata", $con);
$result = mysql_query("SELECT * FROM part_record WHERE record_number = '$rnumber'");
while($row = mysql_fetch_assoc($result)) { global $fname; $fname = $row['file']; } ?><?php
echo "<h4>Part Number: " . $rnumber . "</h4>";
$con = mysql_connect("localhost","user","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("edata", $con);
$result = mysql_query("SELECT * FROM part_record WHERE record_number = '$rnumber'");
?>
<?php
if (mysql_num_rows($result)==0) {
echo "[warning_box]The part number " . $rnumber . " does not exist. Please try again.[/warning_box]
";}
else {
while($row = mysql_fetch_assoc($result)) {?>[iphorm id=9 name="Update Part" values="current_description=<? echo $row['description']; ?>¤t_detailed=<? echo $row['detailed_description']; ?>¤t_notes=<? echo $row['notes']; ?>¤t_rnumber=<? echo $rnumber; ?>¤t_manufacturer=<? echo $row['manufacturer']; ?>¤t_mnumber=<? echo $row['manufacturer_number']; ?>¤t_altmanufacturer=<? echo $row['alt_manufacturer']; ?>¤t_altnumber=<? echo $row['alt_number']; ?>¤t_file=<? echo $row['file']; ?>¤t_file_description=<? echo $row['file_description']; ?>"]
<?php
}}?>
I know the record number is being passed and is correct as it displays the number properly, and also does show a populated field randomly.
Any ideas?
August 14, 2013 at 2:49 pm #5793lawrencepepperParticipantOK,
Figured this out, this has been happening for awhile we just never noticed since the update function of the app was not used often,
BUT
Anytime there is a quote mark (“) in a field it breaks the population of the fields.
We have a couple description fields where quote marks are being used for inches. i.e.: 1.5″ long and 4.5” wide.
How can I fix this so that text fields that have had quote marks put into them do not break the dynamic population? Guessing this has to do with the query to grab the data?
Any help would be appreciated.
Thanks!
August 14, 2013 at 7:47 pm #5800AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.