I would create a form with all 10 rows, hide all but the first 2 rows,
and then use jquery to progressively display the rest of the rows.
Add something like this to each of the rows...
form.element(_id=this_reference_id).append( A(' add', _href='#',
_onclick="jQuery('#%s').show()" % next_reference_id))
On Jun 23, 1:38 pm, Doug Warren <[email protected]> wrote:
> I started writing this a few times but I kept deleting it as I wasn't
> very clear so I'll try again.
>
> I'm looking to create a form that has some tabular data in it, 2
> columns, but the trick is that each submission of the form will have
> between 2-10 rows. Each submission represents a single working set
> that can be edited later to have rows added/deleted. And the rows
> have an order. What I'm looking for basically is a table that starts
> out with 2 rows, 2 columns and a submit button, next to each row is a
> +/- button, if you hit the + button a new row will be added to the
> table below the row you hit the + on. If you hit - the row you hit
> the - on would be removed from the form. On submission all the rows
> would be added to the database and a crud form could be used to go
> back and edit the table again even deleting/adding rows.
>
> Is there any slice or best practice that will do this? I was thinking
> something with JQuery tabular plugin but not sure how to handle the
> creation/deletion of rows part.