devinmcinnis
Forum Replies Created
-
Forum: Plugins
In reply to: [Brilliant Web-to-Lead for Salesforce] AJAX Submission?I’ve solved this with a simple jQuery POST function:
$('form').submit(function(){ var email = $(this).find('#sf_email'); $.post('/halcyon/', { // These are the fields you are sending email: email.val(), // Note: these fields are required to validate for Salesforce message: '', form_id:1, successmsg:1, errormsg:1, w2lsubmit:'Join' }, function(data, status, jqXHR){ // Do something to notify user data has been sent email.val(''); console.log(status + ' with status code: ' + jqXHR.status); } ) .fail(function(){ console.log('Oh no! We have failed you.'); }); // Stop page from refreshing return false; });Edit: The only problem I’ve found with this is that is always returns “success” so you will have to validate the form on the client-side before sending. If you want, I could set up a pull request to add
type="email"instead of having emails as plain text because SF won’t throw errors.Forum: Plugins
In reply to: [Brilliant Web-to-Lead for Salesforce] AJAX Submission?Yeah, I thought about that but couldn’t think of a way to do it without exposing the Organization’s ID and still be able to work with the plug-in’s settings.
Thanks anyway, Nick.
Forum: Plugins
In reply to: [Events Made Easy] Bad parsing from Event List FormatThis is not an anchor tag, but just a href (a link).
What’s not an anchor tag? It’s an anchor tag with an href attribute (a hypertext anchor) unless I’m misunderstanding something.
Putting a whole div inside a link is not done.
I’m not sure what you mean by this; that’s sort of my question. Anchor tags can semantically wrap a div tag so I’m wondering if there is a workaround/fix for this..?