The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Dropdown refilling problem - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: Dropdown refilling problem (/showthread.php?tid=2706)



Dropdown refilling problem - johna1954 - Oct 6th, 2013

Hi,
I have a working form using the api thanks to the excellent tutorials provided. My 2 problems are getting the 'Dropdowns' and 'File' fields to refill.

I am populating the dropdowns from a database and my current code is:

<select name="address" id="address" class="art-table-left_text">
<option value="">Please Select</option>
<?php
do {
?>
<option value="<?php echo $row_regionRS['regionName']?>"><?php echo $row_regionRS['regionName']?></option>
<?php
} while ($row_regionRS = mysql_fetch_assoc($regionRS));
$rows = mysql_num_rows($regionRS);
if($rows > 0) {
mysql_data_seek($regionRS, 0);
$row_regionRS = mysql_fetch_assoc($regionRS);
}
?>
</select>

I replaced - <option value="<?php echo $row_regionRS['regionName']?>"><?php echo $row_regionRS['regionName']?></option>

with

<option value="<?php echo $row_regionRS['regionName']?>"<?php if ($fields["region"] == "<?php echo $row_regionRS['regionName']; ?>") echo "selected"; ?><?php echo $row_regionRS['regionName']?></option>

but end up with a syntax error that has defied my attempts to resolve.

The 'File' fields I have not been able to find code for and if anyone can point me in the right direction I would be most grateful.

Thanks in advance
John