Hello, I'm trying to use this one, but I have an issue.
It works fine, and I received the email, but there is no data.
When I submit the form, it said, {"result":"success", "data":{}}.
I tried with
, but also same result.Am I missing something?
<form method='POST' class='gform contact-us' action='https://script.google.com/macros/s/AKfycbxNNo4Q2P2NWOU2xwFYqkoTwC~~'>
<div class='about-user'>
<div>
<input type='text' class='userInfo' id='userName' placeholder='Name' required />
</div>
<div>
<input type='text' class='userInfo' id='userEmail' placeholder='Email' required/>
</div>
<div>
<input type='text' class='userInfo' id='userMsgTitle' placeholder='Title' required/>
</div>
</div>
<div class='user-message'>
<textarea class='userMessage' id='userMessage' placeholder='Message' required></textarea>
</div>
<input type='submit' class='send' value='보내기'/>
</form>
Thank you for your help.
Where are you following the readme? Your example had “id=gform” which is a sign you’re using an older version of the code. It should be the class.
@mckennapsean I already tried with class. Id and class both out same result.
Class is right; the form is simply missing the name attribute on all of the form elements. These are necessary for HTML forms to send their data to a server (the name is used for stringifying/sending the response). In your example, you could simply swap replace id='*'with name='*'(though if you need those IDs for CSS or something, then add a new attribute). Hope that helps!
https://stackoverflow.com/questions/1397592/difference-between-id-and-name-attributes-in-html
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname
the
nameattribute on all of the form elements. These are necessary for HTML forms to send their data to a server
@mckennapsean THANKS!!! <3
Most helpful comment
@mckennapsean THANKS!!! <3