PDA

View Full Version : Easy Form - Choose Prefix


|Jordan|
01-12-2012, 07:21 AM
I'm using Easy Form (vb 3.8 version) and i want users to be able to choose a thread prefix when they fill out a form. As it is now, forms can only be locked to a specific thread prefix (users cant choose).

I've tried adding the thread prefix dropdown code as an additional custom question, but it doesnt display the dropdown.

<select name="prefixid" id="prefixid" class="bginput">
<option value="">$vbphrase[no_prefix_meta]</option>
$prefix_options
</select>

Anyone know how i can accomplish this?

kh99
01-16-2012, 10:49 AM
It doesn't display anything at all? Do you know if $vbphrase[no_prefix_meta] and $prefix_options are actually set to anything?

hpidriver
03-21-2012, 03:16 PM
This code should display the dropdown of available prefixes, although for me it doesn't seem to register whatever choice is made...
You could use custom question for this:

require_once(DIR . '/includes/functions_prefix.php');
$prefix_options = fetch_prefix_html($form['forumid'], $q["$formbit[id]"], true);
$answer = '<select name="q_' . $formbit[id] . '" id="q_' . $formbit[id] . '" class="bginput">';
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>';
$answer .= $prefix_options;
$answer .= '</select>';