kirkouimet / jformer

jFormer is a form framework written on top of jQuery that allows you to quickly generate beautiful, standards compliant forms.
http://www.jformer.com/
155 stars 47 forks source link

Cancel Button? #17

Open brianjclark opened 11 years ago

brianjclark commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

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 ;)