![]() |
How Do I Assign Variables From Dropdown Selection - Form Hack
I have the Form Hack installed and have a question that I'm hoping someone can answer with relative ease since I'm not getting a response from the developer. My question happens to be basic PHP/HTML, but since I'm not a developer, I can't figure out the issue.
I'm trying to associate values (numeric) based on a selection of a dropdown. The numeric variable is associated to a thread ID wherease the dropdown selection is a recognizable name. Here's the default code: Code:
<select name="dropdownanswer1"> Code:
<option value="$dropdownthreadID" <if condition="$dropdownchoice1a == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1a</option> $dropdownthreadID = 100 $dropdownchoice1a = Monday These variables are called within a newthread_start plugin. Code:
//EXISTING THREAD ID FOR FORM TO REPLY IN Any help would be appreciated! |
woowww.. and what hack is this originally from?
|
Uhh...read the first sentence.
|
aww that hack is garbage. I tried it and it made a Generic Form which i couldn't even access
|
Quote:
|
Hey Ctrl Alt Del,
You ever have any luck with this? I got the form to work flawlessly http://www.adversaryguild.com/forums...ad.php?do=form, but I would really like the thread that the reply goes to be based on the reponse of one of the dropdown selections. I've tried making a hidden field: Code:
<input type="hidden" name="threadrepid" value="$dropdownanswer1" /> Code:
$formreply = "1"; I even assigned the vars as suggested - so they could be read into the array properly: Code:
'threadrepid' => TYPE_STR, |
Since I'm not a programmer, I didn't have much success either so I just did it a redundant and manual way. Here's an example:
Code:
$cust["15"] = "Title 1"; Then in the form, Code:
<option value="$dropdowncust1" <if condition="$dropdowncust1 == $dropdownanswercust">selected="selected"</if>>$cust[15]</option> |
Hey,
Thanks for the quick reply. I "think" I figured it out after much cussing lol... I wound up NOT having to declare any new variables, and NOT having to modify the "form" style. All I did was pretty much what I had been working on previously, but called it slightly differently since the calls I was making were causing SQL to panic because of the array usage. Here's the code if you're interested: Code:
//ENABLE FORM TO REPLY TO EXISTING THREAD - 1 = yes, 0 = no |
All times are GMT. The time now is 03:37 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|