Closed dchun closed 9 years ago
We need to redirect in the requests controller in the create method so if a user adds just the html, the user is still redirected to the path that is defined in the form settings.
Something like:
if form.redirect_link.present?
format.html { redirect_to form.redirect_link, notice: 'Request was successfully created' }
else
format.html { redirect_to request.referrer, notice: 'Request was successfully created' }
end
But we also need to set a condition to set the redirect path to quotemanager.co if the form is submitted in the site.
Also, since the redirect call was made in the inline js file, we need to account for that as well.
I think I will add the DOM event level 2 (inline event in html code). User submit the form like creating an ajax to server so we can't control the form redirect by server.
Add field to redirect form submissions