Originally posted by slabar
View Post
Announcement
Collapse
No announcement yet.
Adding Form to CTUS Page
Collapse
X
-
I was thinking you were trying to implement the CTUS form but I'm not seeing it on your dev site.Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
-
Hi Leslie,
That second error is being generated by the PHP file which is probably not seeing the tokens in the form which were added for preventing spam purposes.Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
I understand the second error - I just don't understand why I still see the first message.Originally posted by Matt Zimmermann View PostHi Leslie,
That second error is being generated by the PHP file which is probably not seeing the tokens in the form which were added for preventing spam purposes.Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Hi Leslie,
You would have to check for any other JavaScript errors and make sure the IDs being used on the form correspond to the JavaScript you are using.
Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
Are there other javascript files that are needed for this form? I'm not getting any sort of javascript errors but I noticed that the Shadows scripts.js doesn't have any sort related to the contact form such as js-contact-form like the scripts.js from other ReadyThemes. I'm thinking this is part of the problem, yes?Originally posted by Matt Zimmermann View PostHi Leslie,
You would have to check for any other JavaScript errors and make sure the IDs being used on the form correspond to the JavaScript you are using.Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Hi Leslie,
There are several AJAX calls in the functions for the old form in the scripts.js file as well as calls to an additional PHP file called token.php. Generally, IDs are not used in the new ReadyThemes so those would need to be added as needed by the JavaScript.Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
So can I copy the jsCTUS function and add it to the script.js file?
Code:jsCTUS: function () { // ---- Additional Server Security To Help Against Spambots ---- // $.ajax({ cache: true, crossDomain: true, dataType: 'script', url: '//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.0/jquery.validate.min.js' }).done(function () { var contactForm = $('#js-contact-form'); $('#js-noscript-warning').remove(); contactForm.show(); $.get('../forms/token.php', function (tkn) { contactForm.append('<input type="hidden" name="mms" value="' + tkn + '" />'); }); // ---- Form Validation ---- // contactForm.validate({ errorContainer: '#js-contact-form div.message', errorLabelContainer: '#js-contact-form div.message small', errorElement: 'p', rules: { contactName: {required: true, minlength: 2}, contactEmail: {required: true, email: true}, contactComment: {required: true, minlength: 2} }, messages: { contactName: {required: 'Your Name Is Required', minlength: jQuery.validator.format('Your Name must be a minimum of {0} characters!')}, contactEmail: {required: 'Your Email Address Is Required', email: 'Your Email Address must be formatted like [email protected]'}, contactComment: {required: 'Comments or Questions Are Required', minlength: jQuery.validator.format('Your Message must be a minimum of {0} characters!')} }, highlight: function (element, errorClass) { $(element.form).find('label[for=' + element.id + ']').addClass(errorClass); }, unhighlight: function (element, errorClass) { $(element.form).find('label[for=' + element.id + ']').removeClass(errorClass); }, submitHandler: function (form) { if ($(this).data('formstatus') !== 'submitting') { var form = contactForm, formData = form.serialize(), formUrl = form.attr('action'), formMethod = form.attr('method') form.data('formstatus', 'submitting'); $.ajax({ url: formUrl, type: formMethod, data: formData, success: function(data, textStatus, jqXHR) { // Show reponse message if (data.search(/error/i) != -1) { $('#js-contact-form div.message').fadeOut(200, function () { $(this).removeClass('message-info').addClass('message-error').text(data).fadeIn(200); }); } else { $('#js-contact-form div.message').removeClass('message-error').addClass('message-success').text(data).fadeIn(200); }; form.data('formstatus', 'idle'); }, error: function (jqXHR, textStatus, errorThrown) { console.log(errorThrown); form.data('formstatus', 'idle'); } }); }; } }); }); },Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Hi Leslie,
As long as you have changed over to jQuery and updated the form code with the proper IDs, you should be able to drop it in.Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
Well...the second part is already in place because the code was copied from a site that used the script file. As for changing over to jQuery...
It looks like at this point in time there is no easy way to get a contact for in Shadows?Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
RTHOMASDESIGN - Swapping out for jQuery is a relatively straight forward process https://www.miva.com/forums/forum/de...ash-for-jqueryMatt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
Yes, the steps are very straightforward, but didn't help me since the JQuery I need isn't included. I don't want to blow the darn thing up. "I just want it to work" - will be the cry of many store owners wanting to be able to do this on their own.Originally posted by Matt Zimmermann View PostRTHOMASDESIGN - Swapping out for jQuery is a relatively straight forward process https://www.miva.com/forums/forum/de...ash-for-jqueryLeslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
I haven't tried yet Leslie. I will try to set aside time tomorrow to look at it and see if I can get her running.Originally posted by lesliekirk View PostI was thinking you were trying to implement the CTUS form but I'm not seeing it on your dev site.
Sincerely,
Stephen M. LaBar, Jr.
(770) 441-9447
The Martial Arts Store
Please Visit Our Site At:
http://www.themartialartsstore.com
Comment
-
So if I understand this thread correctly Miva released new software but failed to provide a solution to a function normally needed on most website.I haven't seen any response from the Miva technical department providing a current solution to this necessary function except to change the software back to the old style and use an old solution. Does that about sum it up? A very interested by stander.Thanks,
Chet Vincentz
[email protected]
www.electrodyne.cc Quality Motoring Accessories
www.racdyn-usa.com BMW, MINI & Porsche performance
www.artisticartifacts.com Creative art materials
Comment
Comment