> Unless, of course, what you have is
>
>name[], email[], sex[0]
>name[], email[], sex[1]
>name[], email[], sex[2]
Yep, that's exactly what I have.
> If it's important to you that the indexes match across name[], email[] and
> sex[], then you must supply
> them explicitly for every
> -Original Message-
From: leledumbo [mailto:leledumbo_c...@yahoo.co.id]
Sent: 10 August 2009 11:11
To: php-general@lists.php.net
> Subject: RE: [PHP] Radio buttons problem
> There is, the entries are grouped by its index. So, I group name[0],
email[0], and sex[0] as
> -Original Message-
> From: leledumbo [mailto:leledumbo_c...@yahoo.co.id]
> Sent: 10 August 2009 11:11
> To: php-general@lists.php.net
> Subject: RE: [PHP] Radio buttons problem
>
>
> > Why do you? There's no reason you *have* to have consecutive
>
> Why do you? There's no reason you *have* to have consecutive indexes --
just iterate over the resulting > array with foreach, and there's no
problem.
There is, the entries are grouped by its index. So, I group name[0],
email[0], and sex[0] as one. The problem if I don't maintain the index for
r
> -Original Message-
> From: leledumbo [mailto:leledumbo_c...@yahoo.co.id]
> Sent: 07 August 2009 05:43
>
> > This should work:
> >
> >
> >
> >
> >
>
> Yes, that works. But should I manually maintain the number in the
> bracket?
> Is there anyway so that it can be automatically mainta
you dont seem to understand how radio buttons work. they treat
name="sex[][]" as a single group. and you can select only one element
in that group.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> you will have to manually maintain the number in the bracket. but you
> can try using a template engine like smarty, and use a for loop to
> take care of the numbers in the brackets
Well.. the entries are inserted / deleted dynamically using JavaScript (to
avoid unnecessary refresh). Why can't
you will have to manually maintain the number in the bracket. but you
can try using a template engine like smarty, and use a for loop to
take care of the numbers in the brackets
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> This should work:
>
>
>
>
>
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):
ent
On Mon, 03 Aug 2009 11:01:13 +0300, leledumbo
wrote:
How can I make a radio button in one entry to behave independently from
the
one in another so that it can be accessed as name and email above?
This should work:
--
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
I'm creating a form with variable number of entries (user controlled) where
each entry consists of some input fields. For most input types, appending []
to their names is enough to allow me processing each entry. So, for
instance, if there are 3 entries with field name[] and email[], they can be
a
11 matches
Mail list logo