A want to write an action that generates a form tag to wrap around a div.
So, I’ve created an item-action, and used fwAddEnclosing(“form”, true).
So far so good. I can set the Name, Action, ID, Method, etc., but, for the life of me, I can’t get it so set the class.
I thought this would work:
formTag.class = fwQuote(fwParameters[“Form Class”].fwValue);
But Freeway kicks out an interpreter error: ‘missing name after . operator’. I’ve checked, and it’s the .class that it doesn’t like. If I set it to ‘.className =’ it works (but the attribute className is no use to me).
Can anyone point me in the right direction please?
Cheers, Ian.
actionsdev mailing list
email@hidden
Update your subscriptions at:
Class is a reserved word, so you have to use the alternate (square bracket) syntax to set it. Try formTag['class'] = fwQuote(fwParameters["Form Class"].fwValue);
Walter
On Mar 1, 2017, at 11:33 AM, Ian Webb email@hidden wrote:
Hi!
A want to write an action that generates a form tag to wrap around a div.
So, I’ve created an item-action, and used fwAddEnclosing(“form”, true).
So far so good. I can set the Name, Action, ID, Method, etc., but, for the life of me, I can’t get it so set the class.
I thought this would work:
formTag.class = fwQuote(fwParameters[“Form Class”].fwValue);
But Freeway kicks out an interpreter error: ‘missing name after . operator’. I’ve checked, and it’s the .class that it doesn’t like. If I set it to ‘.className =’ it works (but the attribute className is no use to me).
Can anyone point me in the right direction please?
This looks excellent. Minor word-geek complaint – the word you want is deprecated (no longer in common use) rather than depreciated (lost some of its value).
Walter
On Mar 2, 2017, at 4:41 AM, Ian Webb email@hidden wrote:
Hi Tim and Walter!
Thanks for this. I was nearly there - I’d left the ‘.’ in before [‘class’].