Re: Radio buttons problem

From: Date: Fri, 07 Aug 2009 04:43:02 +0000
Subject: Re: Radio buttons problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-296419@lists.php.net to get a copy of this message
> This should work: > > <input type='radio' name='sex[1]' value='1'> > <input type='radio' name='sex[1]' value='2'> > <input type='radio' name='sex[2]' value='1'> > <input type='radio' name='sex[2]' value='2'> Yes, that works. But should I manually maintain the number in the bracket? Is there anyway so that it can be automatically maintained? Because my app allows to delete entries arbitrarily. For instance, consider this layout (+ is insert button, - is delete): entry1 +/- entry2 +/- entry3 +/- entry1 has sex[0] field, entry2 has sex[1] and so on. If entry2 is deleted, then I have to change all sex fields in entries below entry2 which is a waste of time. -- View this message in context: http://www.nabble.com/Radio-buttons-problem-tp24786766p24858699.html Sent from the PHP - General mailing list archive at Nabble.com.

« previous php.general (#296419) next »