Add a row in EDIT

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
wuchi
User
Posts: 90

Add a row in EDIT

Post by wuchi »

Hello,

Is it possible to add a row when in Edit tag for example:

item 1 +
item 2 +

etc.

For example:

i want to have only one row then i have add on right and another row appears and i can write into it....i know it is possible this with PHP but how to do it here...

Best regards,
Wuchi


mobhar
User
Posts: 11734

Post by mobhar »

You may simply use Grid-Edit.

Read "Tutorial - Inline Add, Inline Copy, Inline Edit, Grid-Add and Grid-Edit" from PHPMaker help file for more information.


wuchi
User
Posts: 90

Post by wuchi »

hello,

I know what you mean i want to ADD a ROW for example:

FOOD ---> name of the food
INGREDIENTS1
INGREDIENTS2
INGREDIENTS3
etc.

If i use this i have only one row for INGREDIENTS per FOOD....

Best regards,
Wuchi


mobhar
User
Posts: 11734

Post by mobhar »

Have you tried "Master/Detail Edit"?


wuchi
User
Posts: 90

Post by wuchi »

mobhar wrote:
Have you tried "Master/Detail Edit"?

Hello,

this is not what i want. I want if i have for example:

INGREDIENTS _________________ Add
INGREDIENTS _________________ Add
.
.
.

So basicly i need to parse the data in the end to one text field so the end result would be: CARROT,FLOUR,YOGURT etc.

best regards,
Wuchi


danielc
User
Posts: 1601

Post by danielc »

Only one row will appear if you have one field. If you need to add extra input text row, you need to write your javascript script to add/show the row and handle the additional data as this is not in original form.

You may consider to use "select-multiple" for select tag so as to allow user to select the needed ingredients and add an add option so as to allow new ingredients add to the list. See Field Setup in help file.


wuchi
User
Posts: 90

Post by wuchi »

Hello,

Ok. That should not be a problem. Where do i add my script in PHPMaker to run it...

Best regards,
Wuchi


danielc
User
Posts: 1601

Post by danielc »

Put your javascript code in Client Scripts->Table-Specific->Add/Copy Page->Startup Script.


Post Reply