I create a form and send it as a mail. Can I possible to submit that form from gmail.
My form contain an option button and one submit button. When I click the submit button, i will have to store the option button value to the database. Is it possible?
Due to variations between email clients, you can consider <form>s in HTML formatted emails to be a no-go area. Link to a form on a website instead.
Related
I have a Contact Form 7 form and a piece of jQuery code. I am using the jQuery already in the form, there it works well. Nevertheless, I also want to use it in the mail that is transmitted. I suppose I could use wpcf7_before_send_mail. But this is PHP, my variable is created dynamically using jQuery. So it does not fit.
HTML in the form:
<span class="myplaceholder">MY PLACEHOLDER</span>
jQuery:
$(".myplaceholder").text(myvariable);
Now I also need to run the jQuery on the email. It should be something like that:
click on "submit"
create an email
run jquery on that email created and substitute myplaceholder with the value of the dynamically created variable.
Submit email.
Any ideas?
Thanks in advance
Raphael
Use hidden input and set the value using jQuery.
In your contact form:
[hidden your-var-name id:myplaceholder]
Your script :
$("#myplaceholder").val(myvariable);
In your email on CF7 - no need to use hooks...
[your-var-name]
I have 2 forms, both of them are divided in 2.
First time I ask for name, email, phone and company than I have 2 buttons continue and call me
Some of them may not click continue button so I need to get this details before they run away from the page.
I need the form to do an auto save when all fields are completed even if user is not submitting the form.
How can I do this with contact form 7 or formidable forms?
I'm open to new suggestions too, other plugins etc..
Thank you.
u can try this plugin contact form 7 AutoSaver ,
Select some forms to enable auto-save on them, meaning when a user fill the form, without even submitting it, then navigates to another page and comes back or refreshes the page, they will see the data they previously filled still available for them!
https://wordpress.org/plugins/cf7-autosaver/
Question:
How do I make the email field and submit button disappear after an email is submitted?
Details:
My site is built on WordPress with a theme called Edin. I implemented an email submit form using the plugin Mail Subscribe List.
My site is: www.fytnyc.com
I appreciate any help / guidance anyone may have to offer!
The following JQuery this is an example so you might need to change the naming for it to work, depending on what you want the following code removes the email field and button after submitting
jQuery('button#submit').click(function(){
//Fields you want to remove
jQuery("p.sml_email").remove();
jQuery("button#submit").remove();
});
I've made a JsFiddle here: http://jsfiddle.net/qw51cwh9/1/
This codes checks if your submit is clicked upon and if that is the case it will remove the fields inside the function with .remove();
I'm just trying to understand the submit button within php.
I know that it performs that action stated within the form tag. So basically what I have is an form tag that only defines it's ID, i.e. no method attribute nor action. And within this form is a submit button. This input element only defines the type as submit, i.e. no name attribute nor id nor value.
Quickly describing the file: It has two input text elements which are required and a submit button. When i view this file in chrome, and i've clicked the submit button, a pop up shows below the required fields which i have not entered text in stating "required field".
I love this function however, it doesn't check for spaces, i.e. " ".
So back to my question, could someone possibly tell me what the submit button actually does or possibly what methods does it call when i click on it even though the form it is in has no action defined.
When the button is clicked, the browser detects this and submits the form back to the server. This has nothing to do with PHP, it's simply the browser implementing what the HTML specification stipulates.
Since your form does not have an action attribute, what happens is that the browser gathers the values of all eligible input controls in the form, turns that into a query string and makes an HTTP GET request to the current URL using that query string. The HTML5 spec covers this in detail.
The submit button offers one possible interface for the submission of the form. It's like the send button for a text message. While there are alternatives to submit the form, the submit button is the HTML option.
When a form's action is empty, the form submits the GET data to the page that form is on. (Basically, it reloads itself, with the new form data attached.) So you could write your PHP code at the top of the same page to manipulate the data.
In your PHP code at the top of the page, you can test whether or not your form sent data in those two required fields. If one or both are empty, you can echo a message to the user telling them the fields are required.
I have a form which has got five (5) file input controls along with other controls. This form also has got two (2) submit buttons.
I have used JQuery Validation plugin to validate form inputs.
Name of one submit button is "Upload_Images" and name of another is "Upload_Project".
What I want to do is that if user clicks on "Upload_Images" button all files controls should be validated and files uploaded to server but not rest of the data.
If use clicks on "Upload_Project" button then the whole form should be validated and the files are not already uploaded they should be first uploaded and then the project should be saved to DB.
Now if I click on any of the two submit buttons the form Validation kicks in and if there is invalid data it stops form submit process.
How can I achieve this?
Use javascript to change your form 'Action' property to redirect to wherever other page you need to go, then submit.