Drupal contact form validation and alert not working - javascript

I am trying to make a Drupal website. My issue is that - I am not getting any alert/notification after contact form submission.
The page redirects to the Home page. The Form is working fine as I can receive the mail for the contact form but It never shows any success/fail alert.
Moreover, If the required fields are left empty and the form is submitted, then the contact page only reload.
This happens only when I am using Venture theme.
I want alerts for required fields, success and fail notifications.
I am using Drupal 7.40.
Any help/suggestion is appreciated. Thank you

Related

mailchimp modal integration "There are errors below" with bootstrap hidden-xs and visible-xs

I'm having issues with the modal mailchimp pop-up signup form on this website. (tip if you want to view more than once, delete your cookies).
I was trying to add another field besides email and somehow the form stopped submitting, so I reverted to the original code. However, after revering back to the original code, the popup was showing an error of "There are errors below" after the user submits his/her email. After further chrome console inspection, I noticed that if I delete the form with bootstrap's class visible-xs entirely and then remove the class hidden-xs from the other form, it seemed to clear things up.
The user can now submit his/her email on mobile or desktop. But I feel like there's something strange happening. Did mailchimp changing something and that broke the code or am I'm just missing something? I have the form with visible-xs commented out so you can see when you view source.
On top of this I'm trying to add another required location field. It's letting the users submit without selecting a location (even though it contains the html required attribute. Any ideas how to ensure the form isn't sumbitted without selecting a location field? (This is also current commented out so you can see it in the source code.)
Maybe someone has tips on best practices for all of this? Any idea why I have to delete one form for the whole thing to work? Any ideas to code this modal form better? Ideas to get the location field working? Thanks!

How do I prevent page refresh and make it to remain in same tab section after submitting a form

I use a multi-purpose and functional form script which I can call via embed or page load into a mltiple tabbed design.
Each tab has a different form embedded and together with form validation etc, I have it working perfectly. The problem is, when I submit a form in tab 1, it will revert to the save state of the last tab instead of the tab with the submitted form.
I am using FSContact Forms - (http://www.fastsecurecontactform.com/) Php Version and SkyTabs - (http://voky.com.ua/showcase/sky-tabs/.
I am very new to php and total noob to programming.
Thank you for your help.

Javascript form validation not working through LightCMS

So I'm pasting in some code for a form from Salesforce.
This code to be specific: (from the style element to the end of the form) https://gist.github.com/13ab0efd07c2c8cdb3e1
When clicking submit while not filling out any or all fields, I get a form validation check and then a message will popup with the fields that I have not filled out.
However, when I paste the code into our LightCMS template the form validation is not working and just redirects to the thankyou page as if everything went through fine.
They use LightCMS. And even when link to an external js file instead of embedding the js I still get the same results.
I've noticed it adds an "onclick" element on the Submit button on the front-end but it only does that when it's in the CMS not on a bare bones HTML page.
Any thoughts?
i think you should add this
onsubmit=return formvalidator(Document.getElementByid(search-form))
before form action because it will check the form before submitting it. if check fails the action will not occur.

Recreating Facebook Comment Button. Submiting an ajax form

I'm trying to recreate the Facebook comment button. Right now, Facebook comments can only be submitted by pressing enter. I've successfully added a comment button to every textarea, but now I'm having trouble submitting the form. This is my code:
$('.UFILikeLink').after(' ยท <span><a class="submitbtn">Submit</a></span>');
$('.submitbtn').live('click', function(){
$(this).parents('form:first').submit();
});
The form submits to a page which is meant to be called with AJAX, giving me an error.

How do I fill and submit a form remotely?

How can I fill out and submit this form remotely: http://mta-nyc.custhelp.com/cgi-bin/mta_nyc.cfg/php/enduser/ask.php
The form asks for email and then it has a pull down menu and fields for Subject and Question.
Clicking the Next button takes you to a new page and in that page you click submit.
Can I fill this form and submit with one click from my site?
I will have a form in my site where the user will fill out his email and I will have pre-populated fields for Subject and Question and when the user will click the submit button the remote form will be filled and submitted.
How can I do this (with python and javascript)?
If you are submitting the page to your python backend, check out Mechanize.
Try twill - http://twill.idyll.org/python-api.html. I't some wrapper of Mechanize.
Issue a post to ~/api/feedback with the same headers and form data that their form produces?
Open up Chrome dev tools or whatever, go to the network tab, fill out the form manually once and copy the last HTTP POST?
Depending on the type of feedback on that form, the data will change. The data I posted looks like:
feedback: {"name":{"first":"Test","last":"Test"},"email":"test#test.co","feedbackType":{"service":{"sid1":10000,"sid2":14000},"categories":{"cid1":14308}},"attributes":[{"id":"branch_line_route","value":"F"},{"id":"traincarnumber","value":"1"},{"id":"date_of_event","value":"2020-09-10T13:35:47.318Z"},{"id":"time_of_occurence","value":"15:37:37"}],"comment":"Nice train"}

Categories

Resources