How to tie select2 to smarty?

0 like 0 dislike
41 views
Hello, can anyone suggest how to tie select2 to smarty?

The template looks like this
{if $V. other_val} {/if} {if $V. depending.no>=3} 


Don't really know where and what to insert to values did not appear by the hundreds in the list and highlighting as in the search when you start typing the first letter. Or all taki it not to do it?

I tried chosen

$(".chzn-select").chosen();


But, 1 - stop working all js so I put the script in {literal} in the middle of the page, because the body tag in another file where this script is not needed, it is needed only in a single file.

2. It does not work for some reason in this case, in a normal html page the same script works

May be someone faced and understand what was happening
by | 41 views

1 Answer

0 like 0 dislike
Read the documentation on Smarty since I have to use it
\rhttps://www.smarty.net/docsv2/ru/language.function...
there is html_options.

then see what the html code was going the correct way.
And then connect to the page chosen

When you insert javascript in the template you can do it without framing it in a literal.
For this you need to carefully work with the braces.
whitespace { space , as the letter does not have to stick to space }
by

Related questions

0 like 0 dislike
1 answer
asked Aug 14, 2019 by viktorross
0 like 0 dislike
1 answer
asked Jul 12, 2019 by viktorross
0 like 0 dislike
1 answer
asked Apr 12, 2019 by zetwin
0 like 0 dislike
1 answer
asked Aug 9, 2019 by Eridani
0 like 0 dislike
1 answer
asked Aug 11, 2019 by viktorross
110,608 questions
257,186 answers
0 comments
33,606 users