Option Template and Custom Template

Hallo,Try to convert my projects to version 2021.
Have carefully read help file from PHPMaker 2021.
I see that regarding Option Template nothing has changed compared to version 2019Still I am not able to see the same result of “Option Template” as in version 2019.
After filling in cardnumber you will see the fields of cardnumber, name, club etc (Option Template) under input field cardnumber.
This is interesting as one sees when card number corresponds to name and club.
This works in phpmaker 2019 but in version 2021 I only see so nothing.Option Template
{{:lf}}&nbsp<class=“text-muted”>[{{:df2}}]&nbsp<class=“text-muted”>[{{:df4}}]&nbsp<class=“text-muted”>[{{:df3}}]

function Page_Load() {


	$this->LIDKAART1T->DisplayValueSeparator= [];   // This ensures that only the first DisplayField being LIDKAART1X will appear in field LIDKAART1T (for example).
	$this->LIDKAART1U->DisplayValueSeparator=[];   // under field LIDKAART1T you will see fields of option template, click on this if this number is correct, then these  
	$this->LIDKAART2T->DisplayValueSeparator=[];   // fields will be filled in, thanks to Autofill
	$this->LIDKAART2U->DisplayValueSeparator=[];
	$this->LIDKAART3T->DisplayValueSeparator=[];
	$this->LIDKAART3U->DisplayValueSeparator=[];
	$this->LIDKAART4T->DisplayValueSeparator=[];
	$this->LIDKAART4U->DisplayValueSeparator=[];
	$this->LIDKAART5T->DisplayValueSeparator=[];
	$this->LIDKAART5U->DisplayValueSeparator=[];

I also notice that Custom Template is a lot longer in version 2021, something has changed.

<table>
<th>Lidknr.</th><th>Kenm.</th><th>Namen thuisploeg {{{AFD}}}</th><th>Lidknr.</th><th>Kenm.</th><th>Namen bezoekers{{{WED}}}</th><th>Thuisploeg{{{PLOEGT}}}</th><th>Bezoekers{{{PLOEGU}}}</th><th>&nbsp&nbspNationaal</th>
<tr>
   <td>{{{LIDKAART1T}}}</td><td>{{{KENM1T}}}</td><td>{{{NAAM1T}}}</td><td>{{{LIDKAART1U}}}</td><td>{{{KENM1U}}}</td><td>{{{NAAM1U}}}</td><td>{{{US1T}}}</td><td>{{{US1U}}}</td><td>{{{STATUS1}}}</td>{{{CLUB1T}}}{{{CLUB1U}}} 
</tr>
<tr>
   <td>{{{LIDKAART2T}}}</td><td>{{{KENM2T}}}</td><td>{{{NAAM2T}}}</td><td>{{{LIDKAART2U}}}</td><td>{{{KENM2U}}}</td><td>{{{NAAM2U}}}</td><td>{{{US2T}}}</td><td>{{{US2U}}}</td><td>{{{STATUS2}}}</td>{{{CLUB2T}}}{{{CLUB2U}}} 
</tr>

Does this have to do with outdated html elements, why no problems in version 2019.
thx

guido wrote:

Option Template
{{:lf}}&nbsp<class=“text-muted”>[{{:df2}}]&nbsp<class=“text-muted”>[{{:df4}}]&nbsp<class=“text-muted”>[{{:df3}}]


  1. Option Template is for displaying an option of a lookup field, why do you put and in it? If a browser detects invalid HTML tags in the context, they may be removed or relocated by the browser.
  2. The Custom Template you posted is the code you entered, there is no change (although the rendering method has been changed), what did you mean by “a lot longer”?

Dear,
I have modified the ‘Option Template’ as example in help file.
{{: df1}} ({{: df2}})
When entering card number there is a blank rectangle and at the bottom the word “more”,
normally all found card numbers and names are listed above at that moment.
In version 2021 there is an empty box …PS:It was striking that the original ‘Option Template’ in response to entering cardnumber in box [left and right box brackets]
showed for example [blank] 3 timesWith my Custom Template I mean the length of the table, in 2019, 22cm (+ - 9 inch) in version 2021, 34cm (+ - 13 inch).
Both versions have the same custom template.Support tells me to remove Option Template and work with Select2 bootstrap. I have no idea how that works and I think this is a bit far fetched.
They recommend that I use span and div regarding Custom template.
My experience tells me that this will not change much.I am Dutch, so sorry for my English
Thx

  1. You may use any HTML in Option Template but your HTML must not break the HTML of the page (e.g. if you use TD tags, you’ll break it), so normally you use tags like DIV and/or SPAN tags.
  2. v2021 uses Select2, the container width is different from normal SELECT tags, see https://select2.org/appearance#container-width for details. PHPMaker uses “styles”, so you can add your CSS as Custom Attributes (see Field Setup in the help file) to control the width, e.g. [“style” => “width: 500px;”].
  3. If you see “more”, you are probably using AutoSuggest, the default number of items can be set by Tools → Advance Settings, → Auto-Suggest maximum display entries.

Item 1. There are no HTML elements such as TD tags in my ‘Option Template’ .
Literally taken from example in help file.Item 3. My link field is member number (view vwnat), of course that is also my primary key.
All our member card numbers consist of 4 digits.
So if I fill in a member number for example 2, my ‘Option Template’ would show all member numbers starting with 2.
In version 2021 it shows nothing and at the bottom ‘more’.
That is what I meant.I’ve tried a lot of things but without success.
I can also look up the member card number with searchbutton, for example member card number 2, then I see in the modal lookup for example
Genicot Willy(HBL)
Sinterklaas Luc (DVW),
etc ;;;;
Surname and first name (club).
But my option template simply doesn’t show anything and the users are used to see the name and club so they are sure that the correct member card number is entered before clicking save.Thank you again for your patience.

You may check the HTTP response, see https://discourse.hkvstore.com/t/check-http-response/3213/1