Surendra Sharma

Surendra Sharma

Search This Blog

Thursday, February 23, 2017

How to hide WFFM Form Submit Button



In one of our project requirement, there is already a MVC Product form with its own fields and Submit button and we must dynamically show different WFFM forms based on product selection. So that finally user feels that it’s only a one form. 

We were able to show WFFM forms dynamically as I covered in my earlier article.

But there was one issue here. WFFM form also rendering its own Submit button. So, there are two Submit button rendering on screen which confuse the visitors.

We have to hide WFFM button anyway.

You will get below HTML when you inspect your web page for WFFM form button on browser

<div class="form-submit-border">
    <input class="btn  btn-default" type="submit" value="Submit">
</div>

So below JQuery done the magic to hide to hide the WFFM Submit button

if ($(".form-submit-border").length > 0) {
    $('.form-submit-border').hide();
}

I am finding DIV with class “form-submit-border” on page load. If this DIV is available on page then just hide it.

I hope you like this Sitecore tip. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this tip if it’s useful for you.

Sitecore certification in FREE of cost

Sitecore certification is very costly. However, there is one excellent and FREE way to do the basic Sitecore certification for beginner’s track.

Get basic certified by following  

  • Register yourself at https://elearning.sitecore.net
  • Login to eLearning portal
  • Select Sitecore® Developer Foundations eLearning course
  • Complete below modules available with this course
    • Setup Guide
    • Download Installer
    • Download the Student Resources Folder (You will need these files for the course labs)
    • Defining Sitecore
    • Building the Site’s Data Infrastructure
    • Creating the Site’s Content Structure
    • Working with Sitecore Publishing
    • Creating and Applying Presentations
    • Sitecore Solution Foundations eLearning Survey
  • Complete below modules available with this course
  • You will get nicely formatted PPT slide desk, transcript for each slide, CSS, JS, cshtml files, videos, and exercise workbooks.
  • Aprt from videos, rest all are available for download.
    You can complete this course with your pace but within 90 days from your registration date.
     
  • At the end of the course you will honored with below certificate


Sitecore Developer Foundations eLearning Certificate
Sitecore Developer Foundations eLearning Certificate

 
What are you waiting for? Grab your Sitecore Developer Foundations certificate now !!!

Happy Sitecoring 😊