Scandal
Well-known member
Well, we have this part from template "forum_post_thread":
I try to create a template modification to apply an "onclick" event on that submit button.
This is what I fill on the fields:
Search:
Replace:
... but it returns syntax error.
I can't apply full conditional <xf:if> cause <xf:submitrow> is not allow inside it. I could apply as "Search" the whole submitrow field and then use <xf:if>, but I don't want too so it can be more compatible with future xF versions.
I suppose that the issue is on the " and ' characters but don't know how to fix it. I tried too some escape \ characters with no result.
Any idea?
HTML:
<xf:submitrow submit="{{ phrase('post_thread') }}" icon="write" sticky="true">
I try to create a template modification to apply an "onclick" event on that submit button.
This is what I fill on the fields:
Search:
HTML:
icon="write"
Replace:
HTML:
$0 {{ ( $xf.request.filter('myvar', 'int') == 1 ? "onclick="alert('{{ phrase('phrase_name') }}');"" : '') }}
... but it returns syntax error.
I can't apply full conditional <xf:if> cause <xf:submitrow> is not allow inside it. I could apply as "Search" the whole submitrow field and then use <xf:if>, but I don't want too so it can be more compatible with future xF versions.
I suppose that the issue is on the " and ' characters but don't know how to fix it. I tried too some escape \ characters with no result.
Any idea?