A Digital Age Deserves A Digital Leader

Help with radio buttons, in phpbb

Help with radio buttons, in phpbb

Postby kanaloa » Fri Dec 21, 2007 8:17 pm

I've started to see most of what I ask is pretty challenging, but hopefully this is an easier one.

I have just figured out how to make radio buttons in phpbb that auto-propagate a field automatically. I have the same four values each time, so this is easier than typing it in each time. Problem is, I can't get the value I check to be auto-selected the next time around. Any ideas?

I think I'm going to have to modify posting.php to have it check to see which of the buttons has a value, and then put CHECKED in the radio box using a variable.
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
President
User avatar
Posts: 11795
Joined: Sun Mar 10, 2002 1:18 am
Location: Columbia, SC
Real Name: John Derrick

Postby kanaloa » Fri Dec 21, 2007 10:07 pm

^*^ I actually figured it out.

Code: Select all
***$template->assign_vars(array(***

'1_CHECKED' => ( $variable_name ) ? 'checked="checked"' : '',
'2_CHECKED' => ( !$variable_name) ? 'checked="checked"' : '',
'3_CHECKED' => ( !$variable_name ) ? 'checked="checked"' : '',
'4_CHECKED' => ( !$variable_name ) ? 'checked="checked"' : '',
President
User avatar
Posts: 11795
Joined: Sun Mar 10, 2002 1:18 am
Location: Columbia, SC
Real Name: John Derrick

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 0 guests

cron
cron