New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help to add Form to jBox Modal window #145
Comments
You could use the option Something like that: https://jsfiddle.net/StephanWagner/qx5a6fn0/ Confirm boxes will still close when you click |
Much thanks Stephan for your very kind reply/guidance.
with this below the footer:
I cannot 'Continue' unless the fields are populated, but still neither of the Notices appear, when they prompted to. |
When you use the
Not sure why the Notices won't appear... Are you getting any errors in the console? |
Many, many thanks again for your kind guidance. Very helpful.
I have expanded the html to include submitting the populated fields:
However, I don't know how to make the 'Submit' button be the: confirmButton: 'Continue', |
Then you would have to submit the form fields manually. At least that what I would do. Something like that: https://jsfiddle.net/StephanWagner/qx5a6fn0/10/ Once the ajax request is complete, you can handle the response accordingly. See more at jQuery ajax: https://api.jquery.com/jquery.ajax/ |
Much thanks again for your very kind reply/assistance. I have this submit.php file to process the Form field info:
Any additional guidance is greatly appreciated. |
Yeah, nothing happens because the ajax call goes to You are sending the values from the Edit: Something like that: $.ajax({
url: 'https://MY_DOMAIN/submit.php',
method: 'post',
data: {
name: $('#name').val(),
email: $('#email').val()
},
success: function (response) {
console.log(response);
if (response.success) {
// Ajax call was successful, the success key in the response object comes from the server
// Now you can handle here what should happen when everything was OK
alert('Success');
} else {
// An error occured
// Now you can handle here what should happen when an error occurred or the textfields couldn't be validated
alert('Error');
}
}
}); |
Much thanks again for your replies.
And I have the .js:
And I’ve tried to add: myConfirm.close(); into the .js code, but not sure where is the best place to put it. After excuting the Form, still get a dialog box, on the Form page, that shows “web-site-name.com says Error”, yet the Form’s field info gets sent successfully. And after Form submit, in the dev tools > Console it only shows one line, [ ] upload.html:78 |
How does your response object look like in It seems to me you are just returning the email addresses as strings:
This should be something like I'm closing this issue for now as this is not jBox related. Feel free to send me a mail if you have further problems: stephanwagner.me@gmail.com |
Thanks for your great jBox. I have tested it to use it to block a drag & drop file upload page until the user selects that they agree to Terms and then can either Continue or Cancel (code below).
I'd like some guidance to see if I can add a Form where the user must enter a name and email address into two Form fields and have 'confirmButton' be the 'Submit' (submit the form) before he can 'Continue' (to the upload page). I have tried and failed adding the
... code into the content: ' ', area. Any guidance will be appreciated.Much thanks for any help.
The text was updated successfully, but these errors were encountered: