Page 1 of 1

Add a row in EDIT

Posted: Wed Dec 10, 2014 7:48 pm
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


Re: Add a row in EDIT

Posted: Wed Dec 10, 2014 9:09 pm
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.


Re: Add a row in EDIT

Posted: Wed Dec 10, 2014 9:15 pm
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


Re: Add a row in EDIT

Posted: Thu Dec 11, 2014 9:10 am
by mobhar

Have you tried "Master/Detail Edit"?


Re: Add a row in EDIT

Posted: Thu Dec 11, 2014 5:58 pm
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


Re: Add a row in EDIT

Posted: Fri Dec 12, 2014 10:17 am
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.


Re: Add a row in EDIT

Posted: Fri Dec 12, 2014 5:16 pm
by wuchi

Hello,

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

Best regards,
Wuchi


Re: Add a row in EDIT

Posted: Sat Dec 13, 2014 1:19 pm
by danielc

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