How Do I Create An Email Event With Javascript - javascript

Basically i'm creating a website for a friend and he needs a "Contact Us Page", i'm using bootstrap studio and I have a page where you enter your name, and email. But i'm having trouble with the next part. I need the page to open the client's default email program to compose to a certain address with the entered name and email already in it how would one go about this?

simply do something like this
Click Here To Email!
if you want the email to be sent via a form submission you either need to setup a backend that will do that or you can use a service like https://formspree.io/
I've used them before, but I'm not certain what they're rules are about data privacy so its really up to you.

Related

Make the mail body disabled in mailto js

I'm building a shooping site where the customer is ablee to contact the seller with emails.
I dont want to use backend so I just use Mailto.
now, I have 2 questions:
1) Can I open the client mail with disabled field?
So that he wont be able to change the "To" field (for example)?
I dont want to use "readonly" attribute because there are also fields that the user himself need to fill.
2) Can I send the mail from my code without the customer press "send"?
Thank you guys!
Can I open the client mail with disabled field?
No.
Can I send the mail from my code without the customer press "send"?
No.
If you want to do that, then use server-side code to send the email. You might want to use a backend, but you need one. It can be one you run on your websites server or a third-party service.

How to find or create a questionnaire with the function of the prohibition on the same answer?

I need help.
We need to find a questionnaire in which the answer to the question (for example, telephone number) may not be the same for two users.
For Example:
Enter a phone number:
First the user enters a phone number: 123456789
And completes the survey.
The second user starts to question and answers the same phone number 123456789.
He receives an error message or a request to enter a different answer.
Or is there any easy implementation of this problem using php or javascript.
Maybe it is possible to implement with surveymonkey api.
I would be glad of any help or advice.
Google forms writes to a spreadsheet database, allows regular expression fields and attached scripts. Set the field to mach your required format, then validate the response with a script.
Your requirement is persistent storage. You will either require a database, such as MySQL, and use PHP to access it, or a third party application such as SurveyMonkey. However, I can't tell you the limitations of SurveyMonkey, you will have to check their documentation.
I realize that this late and this thread is limited but for others looking for same answer. Here is how I did exactly the same thing for one of my coworkers using Examinare Framework and Examinare Survey Tool.
First, create a html form that sends the phone number to a form.
Inside that PHP file call Examinare PHP Wrapper and check if a recipient has this phone number on their recipient profile.
https://developer.examinare.com/apidocs/listrecipientsbygroup/
A tip: And loop through it the results.
If the recipient not exist, create the recipient. Make sure you add a fake or real email to prevent getting an error.
https://developer.examinare.com/apidocs/addrecipient/
Mark the recipient as a active in the survey.
https://developer.examinare.com/apidocs/markrecipientstosurvey/
Redirect to the survey.
If you want the recipient to return to a certain path then add redirect_url variable to the url with a valid url.
Hope it helps you and future seakers.

How to control what happens when a user puts their email in the text field and clicks submit

I am making a task list on my site, in which i will put different things to do..
In the end they will be asked to put in their email address and click submit.
Now This is what I want to do when they click submit:
The next day,(not right away!) they should get an email that should
link them to next task.
This should be automatic, and I just have to set the submit buttons
up with the right code provided by you.
It will be my great honor if a volunteer helps me out.
I am also using wordpress
This can be done using JavaScript and Java Servlets.
in action page call: action servlet.
Servlet Should be able to send the email at particular time.
How to send email automatically at particular time of day in javaClick here to see how to send an email at particular time
Try this too
You can't do this with just javascript. You will need that form to post to some back end server which can store the information (probably in a database), and process it at some point in the future when it is necessary.

Sharepoint: access subsite page contact from workflow

I'm trying to create a work flow that will send an email to the users in the contact field for the page that the initial link was followed from.
In other words, a user clicks a link on page ../top/sub/pages/page1.aspx which takes them to a form here: ..top/lists/feedback/newform.aspx. Once they submit the form on the top level page it starts a workflow (at ..top/lists/feedback/) which will email the users in the meta data for the referrer page (../top/sub/pages/page1.aspx) and finish by deleting the feedback item.
My problem lies in trying to email the correct user. I have tried to make a work-flow on the sub-site, but it seems like the work-flow has ZERO access outside of its directory.
My next idea would be to try and send the user as a parameter (as part of the form) using a script, but I'm unsure of how to access the information I need.
How would I access the page's contact user? Am I even on the right track?
ps. I dont have access to the server and therefore am unable to use visual studio
Probably there might be some dirty workaround.
add a hidden field to you top/lists/feedback/
add a delegate control that stores the contact on the page the user came from i.e. in the user session (or somewhere in SharePoint or in DB) and place the control on the pages ../top/sub/pages/ (or place it everywhere but make it work only on the pages)
add an itemeventreceiver in the list ..top/lists/feedback/ that grabs what the delegate control saved and inserts it into the hidden field in the item that is created in the ..top/lists/feedback/newform.aspx
use the hidden field in the wotkflow.
I hope you can either accept it or generate you own idea reading my answer.
Good luck!

What is the best approach for confirming html form fields?

A lot of times you get a form where you need to enter an email address (or other form field) twice in order to confirm that you typed it correctly the first time. Some forms disable the copy and paste action (via javascript) in the browser to force the user to type the email address again.
Personally I find this highly annoying. What are your thoughts? Are there other options?
If you really want to check the email address you could implement a confirm email address function, which sends an email to the provided email address. The email could contain a link which allows the user to confirm his/her email address.
For obscured fields like password fields, it is always best to implement a double entry input field in case the user made a typo.
I find it highly annoying as well since, in many cases, the initial entry was done from an autofill that I know is correct.
Please note that this should be a community wiki!
I think it depends on the site, if its something like a commerce site, I'd support disabling the copy and paste because if the address is typed in wrong it can cause pains for both the site and the customer. It's easier for everyone to just inconvenience the customer for 2 seconds during the process instead of having to deal with it later.
I personally disagree with disabling the copy and paste thing. If the user enters the wrong email twice and identically (worst case scenario) it's his fault really.
You should just believe the user. If he mistypes the address, live with it.
First of all, if you confirm registration by sending an email, on the “Now wait for an email and click a confirmation link there” screen you can still show the address to which an email was sent. It can be followed by a link “Oops, mistypes my email address” letting you to correct yourself.
Second, if you use email for notifications, user will not get them, and, curious, he will go to his/her profile settings to check the notification parameters. You just have to make sure that “E-mail” input is next to “Get notifications” checkbox.

Categories