Disable demo submit button and add link to contact
This commit is contained in:
parent
64031261c5
commit
80771e7415
@ -3,10 +3,13 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
if (!demoForm) {
|
if (!demoForm) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
demoForm.addEventListener('submit', function(e) {
|
||||||
|
var submitButton = document.getElementById('demo-submit');
|
||||||
|
submitButton.innerText = 'loading...';
|
||||||
|
submitButton.disabled = 'true'
|
||||||
|
});
|
||||||
|
|
||||||
demoForm.addEventListener('tinyforms:submitted', function(e) {
|
demoForm.addEventListener('tinyforms:submitted', function(e) {
|
||||||
console.log(e);
|
|
||||||
console.log(e.detail);
|
|
||||||
var name = document.getElementById('demo-submission-name');
|
var name = document.getElementById('demo-submission-name');
|
||||||
var demoFields = document.getElementById('demo-fields');
|
var demoFields = document.getElementById('demo-fields');
|
||||||
var demoSucess = document.getElementById('demo-success');
|
var demoSucess = document.getElementById('demo-success');
|
||||||
|
@ -15,7 +15,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>See your entry in the spreadsheet?!</p>
|
<p>See your entry in the spreadsheet?!</p>
|
||||||
<p>
|
<p>
|
||||||
<%= link_to "Get started now", signup_url, class: 'button' %>
|
<%= link_to "Create your form now!", signup_url, class: 'button' %>
|
||||||
|
<br>
|
||||||
|
or got <%= link_to 'further questions?', contact_url %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -68,7 +70,7 @@
|
|||||||
|
|
||||||
<div class="field is-grouped">
|
<div class="field is-grouped">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<button class="button is-link">Submit</button>
|
<button class="button is-link" id="demo-submit">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,5 +22,6 @@ Rails.application.routes.draw do
|
|||||||
get '/auth' => 'sessions#auth', as: :auth
|
get '/auth' => 'sessions#auth', as: :auth
|
||||||
|
|
||||||
get '/demo' => 'home#demo', as: :demo
|
get '/demo' => 'home#demo', as: :demo
|
||||||
|
get '/contact' => 'home#contact', as: :contact
|
||||||
root 'home#index'
|
root 'home#index'
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user