jformer icon indicating copy to clipboard operation
jformer copied to clipboard

Cancel Button?

Open brianjclark opened this issue 11 years ago • 2 comments

Sorry its not exactly an issue but can't find answer anywhere else.

How on earth do you add a cancel button! lol

Can use the HTML component but then it doesn't appear alongside the Submit button at the bottom of the form!?

Any ideas would be great. Am using the closure compiled code from the jFormer website. says 1.4.4 ;)

many thanks brian.

brianjclark avatar Jun 08 '13 15:06 brianjclark

Ah am using your code now and think I'm closer.

jFormer line 734 should be:

$cancelButtonLi->update($cancelButton);

not

$cancelButtonLi->append($cancelButton); ????

as there isn't an append method. Update works splendid though! :)

brianjclark avatar Jun 08 '13 19:06 brianjclark

nope make that ->insert method otherwise none of the attributes are "built", and jFormer 731 needs to be "setAttribute" not attr to update the onClick method.

sorry I am a learner at jquery and javascript ;)

brianjclark avatar Jun 08 '13 19:06 brianjclark