To complete the form we need to add an event handler and button for removing the soft-bar. The handler will use the sb:RemoveBar function and pass it the internal name of the bar. Add the following to the model:
</xf:action>
<xf:action ev:event="my-remove-bar">
<xf:setvalue
ref="@retval"
value="sb:RemoveBar(string(../internalName))"
/>
<xf:message level="modal">
'<xf:output ref="name" />'
has
<xf:output value="
if(
@retval = 'Success',
' been removed. You will need to open a new browser
window to see the change.',
concat(
' failed to be removed. The error is "',
@retval,
'".'
)
)"
/>
</xf:message>
</xf:action>
</xf:model>
To invoke the handler we need another button:
</xf:trigger>
<xf:trigger>
<xf:label>Remove</xf:label>
<xf:dispatch ev:event="DOMActivate"
name="my-remove-bar" target="m-soft-bars"
/>
</xf:trigger>
</body>


Recent comments
14 weeks 3 days ago
14 weeks 3 days ago
18 weeks 12 hours ago
19 weeks 3 days ago
19 weeks 3 days ago
19 weeks 4 days ago
19 weeks 5 days ago
19 weeks 6 days ago
19 weeks 6 days ago
19 weeks 6 days ago