Selecting highest value in list box as default

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

Selecting highest value in list box as default

Post by hkshad »

how do i Select highest value in list box as default?


mobhar
User
Posts: 11729

Post by mobhar »

  1. Assume the values in your List Box are derived from a lookup table, then sort the items by using "Order by" and "DESC" from "Lookup Table" pane.

  2. Put this code in "Row_Rendered" server event to hide "Please Select" option, so that the first item will be automatically get selected:

if (CurrentPageID() != "list" && CurrentPageID() != "search") {
array_shift($this->YourFieldName->EditValue); // adjust "YourFieldName" with yours!
}


hkshad
User
Posts: 12

Post by hkshad »

its working, thanks lot. and one more thing, can we do that in grid add mode?


Post Reply