is there another parameter to separate options displays item?

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

is there another parameter to separate options displays item?

Post by amiens80 »

hi,

There is a parameter named DisplayValueSeparator to configure the character to use between each display field of options (or list items).

I discover, the other separator , the one which separates each options item, is not the same parameter, not even in the html text content, but in the CSS . The comma between each viewValue came from CSS.

the comma cames from that css : .ew-option:not(:last-of-type)::after{content:", "}

i use pm2020 but i check the pm2023 demo, and that coma remains there in the css. there is not PHP option to change/customize it by table like DisplayValueSeparator? am i wrong ?
So, you can see it but you can not edit/select it (not even by mouse) at all, it produces some strange behaviors & difficulties when you select the items (or customize them by php server script in ListOptions_Rendered).
if i want to separate multiples checkbox item by | instead of the coma, it will be the same for all the list items options on all the project.

Where you speak about customize the coma for each display column, you should add the info about ew-option there too. it will same time for other user ;-)
https://phpmaker.dev/docs/#/lookuptable ... n-template

Best regards


arbei
User
Posts: 9284

Post by arbei »

They are two different settings for different purposes. The DisplayValueSeparator is for separating display fields in an option. The CSS setting is for separating options. Since it is only CSS styles you may simply customize by adding your own style under HTML -> Styles -> User.


amiens80
User
Posts: 446

Post by amiens80 »

yes i know that but you can't specify a different style by table .
at least i have to multiple the css class but it is not the right way.

it would be quiet genius if we could override the style/class in the fields option f the view...
i tried Custom Attributes , but it did not work to change the coma by other caracter of my choice

so i have to use ListOptions_Rendered server to perform that :

ie : replace simple coma " ," by ";"

$mystring=$this->myfield->ViewValue;
$mystring=str_replace("</span><span class=\"ew-option\">",";",$mystring);
$tab=explode(";", $mystring);
..then rebuild the view content....


arbei
User
Posts: 9284

Post by arbei »

amiens80 wrote:

at least i have to multiple the css class but it is not the right way.

IMO, it is better than adding ListOptions_Rendered server events to different tables. Of course, it is a developer's rights and preferences to use what he/she likes.


Post Reply