Quote:
Originally Posted by blind-eddie
To edit content of form,after uploading, goto
admincp/Plugins & Products/Plug in Manager/Form Hack, hit edit...follow instructions closely
I do have one question on editing, look at Screen Shot and please tell me how to get rid of the 5 dots....Please & Thank You,
|
First of all you use this for the radio button.
HTML Code:
<td><input type="radio" name="radioanswer1" value="" checked="checked" /> </td>
<td><input type="radio" name="radioanswer1" value="" checked="checked" /> </td>
This is wrong because you don't parse any value with
Second you don?t put a string between
this is required to know the user what it means the check and to parse a value on $RadioAnswer if this opton is checked.
Third you can't set as checked both radio buttons with this
HTML Code:
checked="checked"
The correct format is this
HTML Code:
<td><input type="radio" name="RadioAnswer1" value="$RadioChoiceA" <if condition="$RadioChoiceA == $RadioAnswer">checked="checked"</if> /> $RadioChoiceA
<td><input type="radio" name="RadioAnswer1" value="$RadioChoiceB" <if condition="$RadioChoiceB == $RadioAnswer">checked="checked"</if> /> $RadioChoiceB
RadioAnswer1 -> The name i must be the same in every group of radio buttons.
$RadioChoiceA,$RadioChoiceB -> These variables must set it in the PHP code of your form with this to show it on the user.
PHP Code:
$RadioChoiceA = "Message of option 1";
$RadioChoiceB = "Message of option 2";
$RadioAnswer -> In PHP again this variable keeps the choice of the user (in this string keeps the values of options $RadioChoiceA or $RadioChoiceB)
PHP Code:
'Part 1'
RadioAnswer' => TYPE_STR,
'Part 2
$RadioAnswer = $vbulletin->GPC['RadioAnswer'];
Final if you see we use this if condition
PHP Code:
<if condition="$RadioChoiceA == $RadioAnswer">checked="checked"</if>
This is because if you make Reset or Preview the user wants to keep the choice.
I hope that it helps.