Send Email from a Static HTML Form using Google Apps Mail - html

I have been working through this link https://www.npmjs.com/package/html-form-send-email-via-google-script-without-server also https://github.com/dwyl/html-form-send-email-via-google-script-without-server but can't make it through points 10 & 11 - getting a 'thank you for your message' alert instead of JSON response/alert.
I have talked to Google online and they have referred me here now. I'm using it with bootstrap - my codes is below, any ideas would be great.
<section class="test">
<a name="index"></a>
<div class="container">
<div class="row index_section">
<div class="col-md-10 col-md-push-1">
<h2 class="index_h2">The RE Ledger Foundation is a consortium of east coast real estate and financial services executives with the purpose of exploring the applications and advantages of harnessing a blockchain backed peer-to-peer network.</h2>
<p><a class="btn btn-secondary btn-lg index_button" role="button" href="#contact" data-toggle="modal" >Contact Us</a></p>
</div>
</div>
</div>
</section>
<div class="modal fade" id="contact" role="dialogue">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal" method="POST" action="https://script.google.com/a/macros/headlandholdings.co/s/AKfycbyA1uVrYJK3dowguYNKo65hPfQKLGCFh8_865dFMhXzfE__Io8/exec">
<div class="modal-header">
<h4>Contact RE Ledger</h4>
</div>
<div class="modal-body">
<div class="form-group"><!-- For every row -->
<label for="Contact-name" class="col-lg-2 control-label"> Name: </label>
<div class="col-lg-10">
<input type="text" class="form-control" id="contact-name" name="contact-name" placeholder="Please put your full name">
</div>
</div>
<div class="form-group"><!-- For every row -->
<label for="contact-email" class="col-lg-2 control-label"> Email: </label>
<div class="col-lg-10">
<input type="email" class="form-control" id="contact-email" name="contact-email" placeholder="email#siteexample.com">
</div>
</div>
<div class="form-group"><!-- For every row -->
<label for="contact-message" class="col-lg-2 control-label"> Message: </label>
<div class="col-lg-10">
<textarea type= "text" name="message" rows="8" class="form-control"> </textarea>
</div>
</div>
<div class="modal-footer">
Close it
<button class="btn btn-primary" type="submit"> Submit</button>
</div>
<div style="display:none;" id="thankyou_message">
<h2><em>Thanks</em> for contacting us!</h2>
</div>
</div>
</form>
</div>
</div>
</div>
</div><!-- /.container -->
<!-- Included so that when you complete a contact request you get a message -->
<script data-cfasync="false" type="text/javascript"
src="https://cdn.rawgit.com/dwyl/html-form-send-email-via-google-script-without-server/master/form-submission-handler.js"></script>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.js"></script>

<form class="form-horizontal" method="POST" action="https://script.google.com/a/macros/headlandholdings.co/s/AKfycbyA1uVrYJK3dowguYNKo65hPfQKLGCFh8_865dFMhXzfE__Io8/exec">
In the above line of code, the action= should be referring the link provided by Google. In point 5 of the github link you provided, you should get a link after deploy web app. Use that link instead of the example code.
A tip for you: only copy codes you understand.

Ok - this has taken ages but I figured it out. First of all use the Github link at the top not the other one - it's not as easy to follow.
The issue with the JSON/Ajax was that I was trying to use a different modal to the google sheets one in the example. The important bit is that the id="gforms" line is inserted where your personal generated email address link.
I then took the index example from github and methodically moved across all of the name data. It's tedious but it worked
<div class="modal fade" id="contact" role="dialogue">
<div class="modal-dialog">
<div class="modal-content">
<form id="gform" class="form-horizontal" method="POST" action="--- YOUR LINK HERE ---">
<div class="modal-header">
<h4>Contact RE Ledger</h4>
</div>
<div class="modal-body">
<fieldset class="form-group">
<label for="name" class="col-lg-2 control-label">Name: </label>
<div class="col-lg-10">
<input type="text" class="form-control" id="name" name="name" placeholder="Please put your full name" />
</fieldset>
<fieldset class="form-group">
<label for="email" class="col-lg-2 control-label">Email: </label>
<div class="col-lg-10">
<input type="email" class="form-control" id="email" name="email" value="" required placeholder="email#siteexample.com"/>
</fieldset>
<fieldset class="form-group">
<label for="message" class="col-lg-2 control-label">Message: </label>
<div class="col-lg-10">
<textarea type= "text" id="message" name="message" rows="8" class="form-control"></textarea>
</fieldset>
<div class="modal-footer">
Close it
<button class="btn btn-primary" type="submit"> Submit</button>
</div>
</div>
</form>
<!-- Customise the Thankyou Message People See when they submit the form: -->
<div style="display:none;" id="thankyou_message">
<h2 class='col-lg-10 model_message'> Thanks for your message - We will get back to you soon</h2>
</div>
</div>
</div>
</div>
</div><!-- /.container -->
<!-- Included so that when you complete a contact request you get a message -->
<script data-cfasync="false" type="text/javascript"
src="https://cdn.rawgit.com/dwyl/html-form-send-email-via-google-script-without-server/master/form-submission-handler.js"></script>

make sure that your form has class 'gform'
make sure to add another div under the form directly has class 'form-elements' and close this div before 'thankyou_message'Div

Related

Preventing password box auto select

I am learning django and have built a very basic profile form, I am experiencing a strange issue during page load.
The profile page has a password change form which is at the page bottom and during the browser loading, it auto-navigates to this form and enters the first input field of the form?
Has anyone experienced this and if so how do i prevent this from occurring?
Form on load:
<div class="col-lg-4">
<div class="block">
<!-- Table Styles Title -->
<div class="block-title">
<h2><strong>Change Password</strong></h2>
</div>
<p>Change your password here!</p
<form action="/profile/change_password/" method="post" class="form-horizontal">
<input type="hidden" name="csrfmiddlewaretoken" value="Azuwo63bFBZyum9WJSwwp8gwNcdBKw0cvURhLHoZcVDTsq7ecAJArZTYFE0dHleB">
<div class="col-xs-12">
<div id="div_id_old_password" class="form-group">
<label for="id_old_password" class=" requiredField">
Old password<span class="asteriskField">*</span> </label>
<div class="">
<input type="password" name="old_password" autocomplete="current-password" autofocus class="textinput textInput form-control" required id="id_old_password"> </div>
</div>
<div id="div_id_new_password1" class="form-group">
<label for="id_new_password1" class=" requiredField">
New password<span class="asteriskField">*</span> </label>
<div class="">
<input type="password" name="new_password1" autocomplete="new-password" class="textinput textInput form-control" required id="id_new_password1"> <small id="hint_id_new_password1" class="form-text text-muted"><ul><li>Your password can’t be too similar to your other personal information.</li><li>Your password must contain at least 8 characters.</li><li>Your password can’t be a commonly used password.</li><li>Your password can’t be entirely numeric.</li></ul></small> </div>
</div>
<div id="div_id_new_password2" class="form-group">
<label for="id_new_password2" class=" requiredField">
New password confirmation<span class="asteriskField">*</span> </label>
<div class="">
<input type="password" name="new_password2" autocomplete="new-password" class="textinput textInput form-control" required id="id_new_password2"> </div>
</div>
</div>
<!-- Form Buttons -->
<div class="form-group form-actions">
<div class="col-xs-12 text-right">
<button type="submit" class="btn btn-sm btn-success"> Change Password</button>
</div>
</div>
<!-- END Form Buttons -->
</form>
</div>
Django Template:
<div class="col-lg-4">
<div class="block">
<!-- Table Styles Title -->
<div class="block-title">
<h2><strong>Change Password</strong></h2>
</div>
<p>Change your password here!</p>
<form action="{% url 'change_password'%}" method="post" class="form-horizontal">
{% csrf_token %}
<div class="col-xs-12">
{{ passform|crispy }}
</div>
<!-- Form Buttons -->
<div class="form-group form-actions">
<div class="col-xs-12 text-right">
<button type="submit" class="btn btn-sm btn-success"> Change Password</button>
</div>
</div>
<!-- END Form Buttons -->
</form>
</div>
I am not using javascript on this page it really is a basic setup for learning.
Many thanks

How can I get my third party script to correctly function on my website?

When the user fills out my form and clicks on the button “Generate CV”. The HTML form should automatically download as a PDF to the users download folder.
Problem one:
I tried using this third party plugin but can't get it to function correctly as when I click on the <a class"btn btn-circle btn-outline-brand" onclick="pdfmyform(this);" href="#">Generate CV</a> button nothing happens. How can I get this to work?
Inspect errors
Problem two:
How can I get this button <a class"btn btn-circle btn-outline-brand" onclick="pdfmyform(this);" href="#">Generate CV</a> to look like <input class="btn btn-circle btn-outline-brand" type="submit" value="Generate CV"> I did use the same class. However, I think that class information in bootstrap only applies to the <input> tag so how can I get around this issue?
Below is my current code
<!-- Form-->
<section class="module bg-gray text-center divider-bottom p-3">
<div class="container">
<div class="row">
<div class="col-md-12">
<form id="contact-form" method="post" novalidate>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="text" name="name" placeholder="Name (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="email" name="email" placeholder="E-mail (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="text" name="subject" placeholder="Mobile Number (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Education History (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Previous Employers (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Personal Skills / Hobbies (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<p></p>
<div class="text-center">
<input class="btn btn-circle btn-outline-brand" type="submit" value="Generate CV">
<a class"btn btn-circle btn-outline-brand" onclick="pdfmyform(this);" href="#">Generate CV</a>
</div>
</div>
</div>
</form>
<!-- Ajax response-->
<div class="ajax-response text-center" id="contact-response"></div>
</div>
</div>
</div>
</section>
<!-- Form end-->
Here is the location of where I put the third party script.
<!-- Scripts-->
<script src="assets/js/custom/jquery-3.2.1.min.js"></script>
<script src="assets/js/custom/popper.min.js"></script>
<script src="assets/js/bootstrap/bootstrap.min.js"></script>
<script src="assets/js/custom/plugins.min.js"></script>
<script type="text/javascript" src="http://www.pdfmyform.com/js/pdfmyform.js"></script>
<script src="assets/js/custom/custom.min.js"></script>
</html>
</body>
FULL WEBPAGE CODE BELOW IF REQUIRED
<!-- Form-->
<section class="module bg-gray text-center divider-bottom p-3">
<div class="container">
<div class="row">
<div class="col-md-12">
<form id="contact-form" method="post" novalidate>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="text" name="name" placeholder="Name (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="email" name="email" placeholder="E-mail (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="text" name="subject" placeholder="Mobile Number (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Education History (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Previous Employers (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Personal Skills / Hobbies (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<p></p>
<div class="text-center">
<input class="btn btn-circle btn-outline-brand" type="submit" value="Generate CV">
<a class"btn btn-circle btn-outline-brand" onclick="pdfmyform(this);" href="#">PDF this page!</a>
</div>
</div>
</div>
</form>
<!-- Ajax response-->
<div class="ajax-response text-center" id="contact-response"></div>
</div>
</div>
</div>
</section>
<!-- Form end-->
<!-- Copyright -->
<div class="footer-copyright text-center text-black py-3">© Copyright 2018 Handcrafted By Zeplur. All Rights Reserved |
Terms and conditions
</div>
<!-- To top button--><a class="scroll-top" href="#top"><i class="fas fa-angle-up"></i></a>
<!-- Scripts-->
<script src="assets/js/custom/jquery-3.2.1.min.js"></script>
<script src="assets/js/custom/popper.min.js"></script>
<script src="assets/js/bootstrap/bootstrap.min.js"></script>
<script src="assets/js/custom/plugins.min.js"></script>
<script type="text/javascript" src="http://www.pdfmyform.com/js/pdfmyform.js"></script>
<script src="assets/js/custom/custom.min.js"></script>
</body>
</html>
It looks like your code is fine. But as you can see in the inspect view, errors clearly say that the local resources can not be loaded.
Problem 1 - pdfmyform() is not allowed to read local resources.
Once you host the code with a proper website or a local web(http) server, this should work fine.

Which class I should use to to solve the issue with angularjs input validation?

I created a form and I applied the angularjs validation of it. This work fine but I am facing one issue, if some one help me I will appreciate that.
The form html code is here
<div class="w3-twothird w3-container" ng-app>
<h2>Larger books order form</h2>
<h3>Please fill the following form to order a book!</h3>
<form class="form-horizontal" action="mail-proceeing-form.php" method="post" name="orderForm" novalidate>
<!-- Book Title -->
<div class="form-group">
<div class="col-sm-10">
<input type="text" name="bookTitle" ng-model="order.bookTitle" class="form-control" id="exampleInputName2" placeholder="Title" ng-required="true">
<!--Error Start -->
<div ng-show="orderForm.bookTitle.$touched && orderForm.bookTitle.$invalid">
<span class="text-danger">Please enter a book title!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- Book ISBN-->
<div class="form-group">
<div class="col-sm-10">
<input type="text" name="bookIBSN" ng-model="order.bookIBSN" class="form-control" id="exampleInputName2" placeholder="ISBN" ng-required="true">
<!--Error Start -->
<div ng-show="orderForm.bookIBSN.$touched && orderForm.bookIBSN.$invalid">
<span class="text-danger">Please enter IBSN!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- User Name -->
<div class="form-group">
<div class="col-sm-10">
<input type="text" name="name" ng-model="order.name" class="form-control" id="exampleInputName2" placeholder="Name" ng-required="true">
<!--Error Start -->
<div ng-show="orderForm.name.$touched && orderForm.name.$invalid">
<span class="text-danger"> Please enter your name!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- User Email -->
<div class="form-group">
<div class="col-sm-10">
<input type="email" name="email" ng-model="order.email" class="form-control" id="inputEmail3" placeholder="Email" ng-required="true">
<!--Error Start -->
<div ng-show="orderForm.email.$touched && orderForm.email.$invalid">
<span class="text-danger"> Please enter a valid email!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- User Message -->
<div class="form-group">
<div class="col-sm-10">
<textarea class="form-control" rows="3" placeholder="Your Message" name="message" ng-model="order.message" ng-required="true"></textarea>
<!--Error Start -->
<div ng-show="orderForm.message.$touched && orderForm.message.$invalid">
<span class="text-danger"> Please enter your message!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- Submit Button -->
<div class="form-group">
<div class="col-sm-10">
<input type="submit" class="btn btn-success" value="Submit Request" ng-disabled="orderForm.$invalid">
</div>
</div>
</form>
</div>
The angular js and all required files are connected to the html.
The CSS that I used is given.
input.ng-invalid.ng-touched, textarea.ng-invalid.ng-touched {
border: 2px solid red;
}
If you want to check live please fink the link.
http://manhattanmode.se/old-books/index.php
Now the problem is that, If the user click on input field Title, and leave it empty then the user move to next field i.e. click on ISBN. Then the validation message appear and the input field border get rid.
So the user realize that I need to fill the "Title first", then he again click inside Title field. but unfortunately the ISBN field border get red and validation message appear.
I want if user click on next field and leave the other empty then the validation will show otherwise it will not show.
In simple if user click on next validation must apply on previous but if user move back to previous the validation may not apply on next.
This what I want
As far I know there's no property like hasFocus or whatever like this in the form properties. Also I noticed there's an issue since 2012 asking for something like that.
Then, to achieve what you want you can play with ngFocus and ngBlur directive, as below:
<input type="text" ng-focus="isbnFocus=true" ng-blur="isbnFocus=false" name="bookIBSN" ng-model="order.bookIBSN" class="form-control" id="isbn" placeholder="ISBN" required>
<!--Error Start -->
<div ng-if="orderForm.bookIBSN.$invalid && orderForm.bookIBSN.$touched && !isbnFocus">
The complete code:
<!DOCTYPE html>
<html ng-app>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<div class="w3-twothird w3-container">
<h2>Larger books order form</h2>
<h3>Please fill the following form to order a book!</h3>
<form class="form-horizontal" action="mail-proceeing-form.php" method="post" name="orderForm" novalidate>
<!-- Book Title -->
<div class="form-group">
<div class="col-sm-10">
<input type="text" ng-focus="titleFocus=true" ng-blur="titleFocus=false" name="bookTitle" ng-model="order.bookTitle" class="form-control" id="title" placeholder="Title" ng-required="true">
<!--Error Start -->
<div ng-if="orderForm.bookTitle.$invalid && orderForm.bookTitle.$touched && !titleFocus">
<span class="text-danger">Please enter a book title!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- Book ISBN-->
<div class="form-group">
<div class="col-sm-10">
<input type="text" ng-focus="isbnFocus=true" ng-blur="isbnFocus=false" name="bookIBSN" ng-model="order.bookIBSN" class="form-control" id="isbn" placeholder="ISBN" required>
<!--Error Start -->
<div ng-if="orderForm.bookIBSN.$invalid && orderForm.bookIBSN.$touched && !isbnFocus">
<span class="text-danger">Please enter IBSN!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- User Name -->
<div class="form-group">
<div class="col-sm-10">
<input type="text" name="name" ng-focus="nameFocus=true" ng-blur="nameFocus=false" ng-model="order.name" class="form-control" id="name" placeholder="Name" required>
<!--Error Start -->
<div ng-if="orderForm.name.$invalid && orderForm.name.$touched && !nameFocus">
<span class="text-danger"> Please enter your name!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- User Email -->
<div class="form-group">
<div class="col-sm-10">
<input type="email" name="email" ng-focus="emailFocus=true" ng-blur="emailFocus=false" ng-model="order.email" class="form-control" id="inputEmail3" placeholder="Email" required>
<!--Error Start -->
<div ng-if="orderForm.email.$invalid && orderForm.email.$touched && !emailFocus">
<span class="text-danger"> Please enter a valid email!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- User Message -->
<div class="form-group">
<div class="col-sm-10">
<textarea class="form-control" ng-focus="messageFocus=true" ng-blur="messageFocus=false" rows="3" placeholder="Your Message" name="message" ng-model="order.message" required></textarea>
<!--Error Start -->
<div ng-if="orderForm.message.$invalid && orderForm.message.$touched && !messageFocus">
<span class="text-danger"> Please enter your message!</span>
</div>
<!-- Error End -->
</div>
</div>
<!-- Submit Button -->
<div class="form-group">
<div class="col-sm-10">
<input type="submit" class="btn btn-success" value="Submit Request" ng-disabled="orderForm.$invalid">
</div>
</div>
</form>
</div>
</body>
</html>
Tips:
Use preferably ngIf directive instead of ngShow.
In your case, ng-required="true" is unnecessary, you can simply use required as I did. ngRequired directive is used when you want to put a condition to the field to make it required or not.
I don't know if you have all the fields with the same id like here, but it's semantically incorrect.
Note: I don't think it's the best solution, but I think it can help you to solve your problem.

Dropzone.js inside a Bootstrap modal break flow and styling

I am using the Dropzone.js plugin (which function to send via ajax and drag and drop effect, files to server) the problem is that it's breaking all the form of the stream (which contains other basic fields as input text / password) already tried incapsular tags within divs, add maximum size for file upload area but nothing worked.
I am using only the JS and CSS provided by jquery, bootstrap and
dropzone (and the shipping configuration).
I add the full sample project with this problem on Github
Scripts in tag Head
<link rel="stylesheet" href="library/Bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="library/dropzone/dropzone.css">
<link rel="stylesheet" href="assets/css/main.css">
<script defer src="library/jquery-1.11.1/jquery-1.11.1.min.js"></script>
<script defer src="library/Bootstrap/js/bootstrap.min.js"></script>
<script defer src="library/dropzone/dropzone.js"></script>
<script defer src="assets/js/main.js"></script>
Bootstrap modal:
<div class="modal fade" id="add-product-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title span7 text-center" id="myModalLabel">Add Product</h4>
</div>
<div class="modal-body">
<form class="form-horizontal dropzone" id="add-product-form" action="#" method="post">
<div class="dropzone-previews"></div> <!-- this is were the previews should be shown. -->
<div class="form-group">
<label for="input_email" class="control-label col-md-3">Your Email (login)</label>
<div class="col-md-9">
<input type="email" class="form-control" id="email" name="email" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="input_password" class="control-label col-md-3">Password</label>
<div class="col-md-9">
<input type="password" class="form-control" id="pass" name="pass" placeholder="Password">
</div>
</div>
<div class="checkbox text-center">
<label><input type="checkbox" id="remember_me" name="remember_me">Remember me on this computer</label>
</div>
<div class="form-group text-center">
<div class="col-md-6 col-md-offset-3">
<button type="reset" class="btn btn-danger">Reset</button>
<button type="submit" class="btn btn-info">Login</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
The actual modal:
As it should be:
An easy solution is to use a div element inside the form to use as dropzone, here is how the modal-body would look like.
html:
<div class="modal-body">
<form class="form-horizontal" id="add-product-form" action="#" method="post">
<div id="myDropzone" class="dropzone"></div> <!-- This is the dropzone element -->
<div class="form-group">
<label for="input_email" class="control-label col-md-3">Your Email (login)</label>
<div class="col-md-9">
<input type="email" class="form-control" id="email" name="email" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="input_password" class="control-label col-md-3">Password</label>
<div class="col-md-9">
<input type="password" class="form-control" id="pass" name="pass" placeholder="Password">
</div>
</div>
<div class="checkbox text-center">
<label>
<input type="checkbox" id="remember_me" name="remember_me">Remember me on this computer</label>
</div>
<div class="form-group text-center">
<div class="col-md-6 col-md-offset-3">
<button type="reset" class="btn btn-danger">Reset</button>
<button type="submit" class="btn btn-info">Login</button>
</div>
</div>
</form>
</div>
Then since you are using a div for your dropzone element you need to specify the url in the dropzone configuration:
js:
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("div#myDropzone", { url: "#"});

Bootstrap login and signup forms are not aligning

I want my Signup and Login form at the same place .By default i want to show the Signup form . On Login Button Click event i want Signup form should be replaced by Login form at the same place or position but its not happening . What is happening is Signup form is coming at top while login form is coming at down . To see the result as of now i have removed Visibility css ..
Here is my Markup ..
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="top-content">
<div class="inner-bg">
<div class="container">
<div class="row">
<div class="col-sm-7 text">
<h1><strong>Custom</strong> Authentication Form</h1>
<div class="description">
<p>
Please register or enter credentials to enjoy the app
</p>
</div>
<!-- Trying to add Angular JS Snippet !-->
<div ng-controller="LoginController" class="top-big-link">
<a class="btn btn-link-1" href="" ng-click="$event.preventDefault();Register()">Login</a>
</div>
</div>
<!-- Signup Form Here !-->
<div ng-controller="SignupformController" class="col-sm-5 form-box">
<div class="form-top">
<div class="form-top-left">
<h3>Sign up now</h3>
<p>Fill in the form below to get instant access:</p>
</div>
<div class="form-top-right">
<i class="fa fa-pencil"></i>
</div>
<div class="form-top-divider"></div>
</div>
<div class="form-bottom">
<form role="form" action="" method="post" class="registration-form">
<div class="form-group">
<label class="sr-only" for="form-first-name">First name</label>
<input type="text" name="form-first-name" placeholder="First name..." class="form-first-name form-control" id="form-first-name">
</div>
<div class="form-group">
<label class="sr-only" for="form-last-name">Last name</label>
<input type="text" name="form-last-name" placeholder="Last name..." class="form-last-name form-control" id="form-last-name">
</div>
<div class="form-group">
<label class="sr-only" for="form-email">Email</label>
<input type="text" name="form-email" placeholder="Email..." class="form-email form-control" id="form-email">
</div>
<button type="submit" class="btn">Sign me up!</button>
</form>
</div>
</div>
<!-- Login Form Here !-->
<div ng-controller="LoginformController" class="col-sm-5 form-box">
<div class="form-top">
<div class="form-top-left">
<h3>Login now</h3>
<p>Fill in the form below to get instant access:</p>
</div>
<div class="form-top-right">
<i class="fa fa-pencil"></i>
</div>
<div class="form-top-divider"></div>
</div>
<div class="form-bottom">
<form role="form" action="" method="post" class="registration-form">
<div class="form-group">
<label class="sr-only" for="UserID">User ID</label>
<input type="text" name="UserID" placeholder="User ID..." class="form-first-name form-control" id="UserID">
</div>
<div class="form-group">
<label class="sr-only" for="Password">Password</label>
<input type="text" name="Password" placeholder="Password..." class="form-last-name form-control" id="Password">
</div>
<button type="submit" class="btn">Login!</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
Please help me to resolve this ..
This is how I did it:
<div class="col-sm-7 text">
<h1><strong>Atlas</strong> Authentication Form</h1>
<div class="description">
<p>Please register or enter credentials to enjoy the app</p>
</div>
<ul class="nav nav-pills" id="myTab">
<li class="active">Sign Up </li>
<li>Log In </li>
</ul>
</div>
</div>
<div class="tab-content">
<div class="tab-pane active" id="signup">
<div ng-controller="SignupformController" class="col-sm-5 form-box">
...
</div>
</div>
<div class="tab-pane" id="login">
<div ng-controller="LoginformController" class="col-sm-5 form-box">...</div>
</div>
</div>
Here is the JSFiddle demo
What you are actually to achieve is basically the way bootstrap nav-pills work. You just need to display the buttons as nav-pills and then set the respective contents in tab-content class.
Using data-toggle="pill" will automatically switch between the tabs and contents.
(You can add the fade class along the tab-pane class to give the switching a little effect like this :) )