Hi Support Team,
I have basic 2 questions?
- Is there a way to call the DB Save action with Custom element button's onClick event (before the form submit)?
- If I make new events how and when could I use it? For example in what cases is it needed to create own events?
Thanks is advance,
Peter
Hi Peter,
a) This would need an Ajax submission and while that is possible to do it's not built in to ChronoForms.
b) You typically want to create new events when you want something to happened other than when the main form loards or is submitted. Ajax queries; PayPal IPN 'hidden' confirmations; multi-page forms; and other remote queries all use new events. That said, 98% of forms don't use them.
Bob
Hi Bob,
Instead of this Ajax submission maybe it could be another solution too?
If I make a new custom event with a DB save action, then somehow could I use/connect this with my custom element button?
One more question: What is the right syntax to use/refer the form elements in a Load JS javascript code (document.getElementsByName, ...)?
Thanks, Peter
Hi Peter,
1) I'm not clear what you are trying to do with the DB Save. The only ways that I know of to send data to the server are (a) to submit the form or (b) to use Ajax or something similar to submit the data directly from the form. I suppose that you could use an HTML request as the form submits but I'm not sure how that helps.
2) Whatever works. I usually assign ids and use the MooTools syntax which saves quite a lot of typing. $('element_id'). . . .
Bob