m0nde
04-29-2016, 10:06 PM
I've created a custom profile field with several radio buttons. Each radio button has a text value assigned to it and the user must choose a single value from this list.
I want to branch depending on the string value of this field in a template and execute a separate script based on each value.
What I've tried is: <vb:if condition="$memberinfo['field6'] = 'x'"><script type"text/javascript" src="x.js"></script></vb:if>
<vb:if condition="$memberinfo['field6'] = 'y'"><script type"text/javascript" src="y.js"></script></vb:if>
<vb:if condition="$memberinfo['field6'] = 'z'"><script type"text/javascript" src="z.js"></script></vb:if>
But all of the scripts execute at once.
I want to branch depending on the string value of this field in a template and execute a separate script based on each value.
What I've tried is: <vb:if condition="$memberinfo['field6'] = 'x'"><script type"text/javascript" src="x.js"></script></vb:if>
<vb:if condition="$memberinfo['field6'] = 'y'"><script type"text/javascript" src="y.js"></script></vb:if>
<vb:if condition="$memberinfo['field6'] = 'z'"><script type"text/javascript" src="z.js"></script></vb:if>
But all of the scripts execute at once.