How to edit a dinamic form

pandaboy 27 May, 2010
I created a form with dynamic inputs following this tutorial http://www.chronoengine.com/forums.html?cont=posts&f=5&t=15219 but now I can edit the fields than I add dynamically, the thing is than the database store arrays then I need some way to acces this data, process the array and generated the fileds with php but I still can't. There is some object in CF like $MyRow object in CC??????????????z
GreyHead 27 May, 2010
Hi pandaboy,

I'm not sure that I understand the question.

If you want to get data from the database and display it then you need to add the PHP/MySQL to do that???

Bob
pandaboy 27 May, 2010
I sucefull create the dinamic form, then th user can add so inputs like e wants, this inputs name are like example "Name[]".

But when I put the link {edit_record} and the user tried to edit the form th inputs generated dinamycally aren't load, then I need to know how to acces the information of these fields, this are arrays obviusly, process it and generated the new fields dinamically.

Example:

I have a form for the personal information and there is a block called childrens, the user cann add how many childrens like he want, for the example are gonna be 2, then he saved it to the database. Until there fine.

The the information is displayed and the user wants to add, remove o edit children then he use {edit_record} link, when the form is open all the personal information than is not dinamyc is load fine and can edit it normally but the block childrens doesn't display what he have in the database because it is a vector and it doesn't know how process it.

The what I want is some kind of object like $MyRow in CC which contain the information of every field like $MyRow->childrens, then my script will process it and generate again the inputs necesary, but I ntil the moment cant acces to these info.

Its there something similar $MyRow in CC for CF or i will have to do the query to the database manually???
GreyHead 28 May, 2010
Hi pandaboy,

OK I think I've understood.

I'd probably do that by gettign the length od one of the result arrays with count($name) and then using a PHP loop to create the correct number of children inputs.

Bob
This topic is locked and no more replies can be posted.