I'm working on a project that I'm using stripe to handle payment processing, as part of this I've created a form for collecting card information, my problem is that I want to submit some of the data to be sent to my server (like name and email address), but other parts (the card details) I don't since they're processed by stripe so there's no point sending them to my server.
I'm not sure how I can do this though, since the input fields that I do and don't want to send are all mixed together, so I can't just wrap the parts I do want in the form tag and not the rest.
Is the a flag on a form field that I can set so that it isn't submitted with the form?
Any help would be greatly appreciated.
Using Javascript or Ajax may be the best way
Get values and trigger for differentes urls
Check this link: send specific part of the form fields to server using ajax?
Related
I want to create a feedback form where the users input data and when they press submit button, all the data entered is received by the admin at an email address which has been predefined in the code.
i don't want to use "mailto" as it opens another service. Is there any way to send data to email through the HTML form itself?
Forms send data to the URL specified in the action attribute.
mailto: URLs, which you have sensibly ruled out, are highly unreliable.
The only other kind of URL which can be usefully used is an http(s) URL where it is then processed by server side code.
If you want to send the emails to a different address then you need to change the server side code so it doesn't use a single address.
After a lot of research, I have decided to use https://formsubmit.co for this purpose. The details are present in their documentation.
It was exactly what I wanted, and completes my requirements. Thank you to everyone for their help.
I've been coding a website, it's nearly finished but I want users to be able to sign up for a newsletter. I've found that you can use the submit button but I don't know how to. How do you get the button to email you the information? Any help appreciated, thanks.
Typically the page contains a series of input elements ( think text boxes etc) which the user puts their data in to, the submit button POSTs a form to the server, the server can then access those form values and use them as required.
So in your scenario the server received an email address and name, for example, and you have an email library which can send that information to you. Alternatively of course you might put that information in a database so you can more easily handle subscriptions.
Look at this tutorial how get user email and save in database.
http://www.informit.com/articles/article.aspx?p=1924985
I have a small ecommerce business and from time to time a customer will say that they never ordered the item and I am forced to refund their money due to lack of any confirmation from the customer as to his actually placing the order.
I would like to add either an hmtl button or any sort of tool to the emails that i sent you with the customer's receipt. The customer will get the email with his receipt and also within the email will be a button ("I approve This Transaction") for him to click on that will send me back a confirmation email.
Please advise.
Thanks,
Don
There are 2 ways to do this.
With a mailto: link, this would open the users default email client where they would have to send the email as an extra step.
URL parameter in a normal href/button link (ie: www.yoursite.com/yourpage.php?email=their#email.com). You would link to a webpage (yourpage.php) that would pass that URL parameter (in this example "email", but can be any other info you pass through) you can then parse that URL parameter in your webpage and have it email you automatically based on that info.
Option 2 is the way to go, but requires some coding knowledge (PHP for example). Also, in order to set up unique URL parameters, you'll need a system that uses merge tags to create unique values for each email you send. I'd suggest you should use a transactional email service provider for this.
I'm passing document.referrer to GetResponse when a user submits the subscription form. The custom field has been added to the form at runtime as instructed in this document and the "Forward Data" option is on. Upon form submission, the parameters are posted correctly. Problem is, the value doesn't show up anywhere in the user's details in GetResponse, where it would be most useful. Where can I retrieve it?
I'm answering my own question s I've found the solution by trial and error. Not even the support people at GetResponse were able to help.
Apparently, only the custom fields that are actually added to the form designer get recorded. So if you use a custom form (not created with designer), on top of adding the <input> fields in your code, you'll have to create them first (dashboard > contacts > custom fields) and add they'll appear in the designer as well (on the right side).
After that, the passed values will show up in the contact's detail card. To retrieve the values for more than one contact in bulk, you'll have to export the contacts to csv, xml or xls, as support says there is no way to display additional columns on the contacts page. The alternative, if you are looking for a specific value, is to filter by the custom field on the contacts page (left side, 'add custom field').
I have created hidden form and it will be contain hidden input and javascript submit. But while form is submitted, user can view the source of page and will know all values of it. How can I hide this form or encrypt it so that user can not know values from even source of html.
You could encrypt the data (using standard strong encryption) on the server and store the result in the form.
Standard practise, however, is to not give sensitive data to the client in the first place. Store the data on the server, associate it with a token, then give that token to the client.
Sessions are the standard approach for doing that.
If this information is sensitive, don't post it on the page at all.
Keep the data on the server and have a token to correlate the request with it.
You can't. Maybe you can hide stuff from an average user, but given enough skills data that's available to the user can be read / manipulated by the user. The right practice is to store data at the server and associate it with a user.
For example, you can have a look at PHP sessions.