you can allow the user to enter as many fields they want.
example:
CREATE TABLE profile_addons (
id int(10) unsigned NOT NULL auto_increment,
profile_id int(11) unsigned NOT NULL,
name varchar(75) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 ;
On Jan 6, 1:34 pm, "Dave" <make.cake.b...@gmail.com> wrote:
> What would be the easiest way to add say 10 input fields to a form that
> hasMany?
>
> I am allowing a user to add additional info to a profile and want to have 10
> empty fields where they can type in whatever they want.
>
> I can manually make a form with 10 input fields but would like to know a
> simplified approach.
>
> Working with the idea of a foreach and build the fields but cant seem to get
> the idea of how to loop thru when there is nothing to loop ):
>
> $count++
> if $count > 10 type idea
>
> Ideas to point me in the right direction would be great.
>
> Thanks
>
> Dave
No comments:
Post a Comment