Quote:
Originally Posted by hpidriver
I am using this custom question code, and it shows me the correct choices of prefixes when filling out a form.
However, when I click submit, Easy Forms does not recognize that any prefix was chosen. ie. if the custom coded prefix question is made "compulsory" it always throws the error of : "The form did not submit as the following questions are unanswered: "
Anyone have the prefix option for posting to a new thread working? on vb3.8.6
|
I was having this same problem on 3.8.5, it showed the dropdown menu to choose the prefix but when the thread was published no prefix had been added.
It's now working using the code as below and since I upgraded the plugin to the 3.7 beta and (in the xml file) changed all instances of TYPE=MyISAM to ENGINE=MyISAM. (I don't know if that's related to the issue but just posting here in case it helps someone else tearing their hair out like I was!) This is the code used (as has been posted previously in this thread)
In a custom question called 'prefix':
Code:
require_once(DIR . '/includes/functions_prefix.php');
$thisanswer = $q[$formbit[id]];
$prefix_options = fetch_prefix_html($form['forumid'], $thisanswer, true);
$answer = '<select name="' . $formbit[id] . '" id="q_' . $formbit[id] . '" class="bginput">';
$answer .= '<option value="">'.$vbphrase[no_prefix_meta].'</option>';
$answer .= $prefix_options;
$answer .= '</select>';
and in the 'Form Hook: Before Submit:' section:
Code:
$form['prefix'] = $form['prefixid'] = $qo['15'];
*where 15 is the question # for the prefix custom question
Thank you developer, awesome plugin! (I tried to get this working years ago and struggled but I guess my vb brain has evolved since then

)