Edit field custom code

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

Edit field custom code

Post by wuchi »

Hello,

I need to add list view when i add some items so i have the whole list before i add them is there a way to do this and where to add this to Edit page ?

Best regards,
Wuchi


scs
User
Posts: 694

Post by scs »

Please don't save the 'period', 'comma' in your question. Very hard to read your message and understand your needs.


Webmaster
User
Posts: 9430

Post by Webmaster »

If you mean adding a new option for a lookup on the fly, use the "Add Option" feature. Otherwise, please explain your question clearly.


wuchi
User
Posts: 90

Post by wuchi »

Hello,

Add option feature...where is tha located?

Best regards,

Wuchi


mobhar
User
Posts: 11761

Post by mobhar »

Just enable "Allow add" under "Fields" setup -> "Lookup Table".

Please read "Using Lookup Table for Edit Tag (Text/Radio/Checkbox/Select)" section under "Field Setup" topic from PHPMaker Help menu.


wuchi
User
Posts: 90

Post by wuchi »

Hello,

This is not what i meant. So my issue is when i am in ADD FOOD for example in want to see also ALL THE PREVIOUS items so what i want is in ADD page to see also LIST or VIEW for the items...

Best regards,

Wuchi


digitalphotoworld
User
Posts: 416
Location: Nürnberg/Germany

Post by digitalphotoworld »

Add the following Code in Server Event Add/Copy Page -> Page_DataRendering and/or to Edit Page -> Page_DataRendering
You have to replace the name of your table and choose the fields that should ouptutted.

$header = "<h3>Foodlist</h3>";
$sql = "SELECT * FROM food_table ";
$rs = ew_LoadRecordset($sql);
while (!$rs->EOF) {
header .= $rs->fields['foodname']."<br>";
$rs->MoveNext();
}

The code above adds a list of all "foods" from your table "food_table".
If you want the list below you have to add the code to Page_DataRendered


wuchi
User
Posts: 90

Post by wuchi »

Hello,

I get the following error:

Parse error: syntax error, unexpected T_CONCAT_EQUAL in C:\AppServ\www\V11\foodadd.php on line 998

Best regards,
Wuchi

digitalphotoworld wrote:
Add the following Code in Server Event Add/Copy Page -> Page_DataRendering and/or
to Edit Page -> Page_DataRendering
You have to replace the name of your table and choose the fields that should
ouptutted.

$header = "<h3>Foodlist</h3>";
$sql = "SELECT * FROM food_table ";
$rs = ew_LoadRecordset($sql);
while (!$rs->EOF) {
header .= $rs->fields['foodname']."<br>";
$rs->MoveNext();
}

The code above adds a list of all "foods" from your table
"food_table".
If you want the list below you have to add the code to Page_DataRendered


wuchi
User
Posts: 90

Post by wuchi »

Hello,

Fixed...correct syntax is:

$header = "<h3>Foodlist</h3>";
$sql = "SELECT * FROM food_table ";
$rs = ew_LoadRecordset($sql);
while (!$rs->EOF) {
$header .= $rs->fields['foodname']."<br>";
$rs->MoveNext();
}

THX for HELP ;)

Best regards,
Wuchi

wuchi wrote:
Hello,

I get the following error:

Parse error: syntax error, unexpected T_CONCAT_EQUAL in
C:\AppServ\www\V11\foodadd.php on line 998

Best regards,
Wuchi

digitalphotoworld wrote:
Add the following Code in Server Event Add/Copy Page -> Page_DataRendering
and/or
to Edit Page -> Page_DataRendering
You have to replace the name of your table and choose the fields that should
ouptutted.

$header = "<h3>Foodlist</h3>";
$sql = "SELECT * FROM food_table ";
$rs = ew_LoadRecordset($sql);
while (!$rs->EOF) {
header .= $rs->fields['foodname']."<br>";
$rs->MoveNext();
}

The code above adds a list of all "foods" from your table
"food_table".
If you want the list below you have to add the code to Page_DataRendered


wuchi
User
Posts: 90

Post by wuchi »

Hello,

Another question is there a way to add remove item then i enable add item from add page...

Best regards,

Wuchi


Post Reply