How can I make input field border colour is red when user trying to submit form without entering field value?

  • soujanyadarla
    Asked on February 14, 2019 at 2:30 AM
  • Victoria_K
    Replied on February 14, 2019 at 7:48 AM

    Normally, it is enough to set a field as required for the border to be in red when user trying to submit form without entering field value. To set a field as required, please right click on it and select 'Require' option:

    How can I make input field border colour is red when user trying to submit form without entering field value? Image 1 Screenshot 20

    If you are experiencing difficulties with specific form, please provide us the link and we will gladly take a look. 

  • soujanyadarla
    Replied on February 14, 2019 at 9:53 PM

    HI Victoria_K

    Thank you for your response this ismy link can you help me 

    https://c.cs58.visual.force.com/apex/ApplicationWizardFirstPageNew

  • soujanyadarla
    Replied on February 14, 2019 at 9:54 PM

    <!--

    Created By: Guna

    Created Date :21/11/2018

    Description : For Connect to Unbounce Lead creation

    -->


    <!--

    Modified By: soujanya

    Modified Date :14/02/2019

    Description :Redesign the unbounce page

    -->




    <apex:page sidebar="false" showHeader="false" standardStylesheets="false">

          <html lang="en">

            <apex:includescript value="{!$Resource.Unbounce_Images}"/>

            <apex:stylesheet value="{!$Resource.UnbounceCss}"/>

            <apex:includescript value="{!$Resource.Unbounce_fonts}"/>

            <apex:includescript value="{!$Resource.Unbounce_js}"/>

    <head> 

                <meta charset="UTF-8"/> 

                 <link href="{!URLFOR($Resource.UnbounceCss,'css/bootstrap.min.css')}" rel="stylesheet"/>

                 <link href="{!URLFOR($Resource.UnbounceCss,'css/style.css')}" rel="stylesheet"/>

                 <link href="{!URLFOR($Resource.UnbounceCss,'css/style_add.css')}" rel="stylesheet"/>

                 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"></link>

                <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>

                 <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet"/>

                <script src="js/jquery-3.3.1.min.js" defer=""></script>

                 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"/>      

                        <!-- Google Tag Manager -->

                        <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':

                        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

                        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

                        'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);

                        })(window,document,'script','dataLayer','GTM-W9WSRV');</script>

                        <!-- End Google Tag Manager --

                       

                       

                      

          <!-- Global site tag (gtag.js) - Google Analytics -->

                        <script src="https://www.googletagmanager.com/gtag/js?id=UA-38245265-7"></script>

                        <script>

                        window.dataLayer = window.dataLayer || [];

                        function gtag(){dataLayer.push(arguments);}

                        gtag('js', new Date());

                        

                        gtag('config', 'UA-38245265-7');

                        </script>

                        

                 <!-- Global site tag (gtag.js) - Google Analytics -->

                 

                 

                    <script type="text/javascript">

                    window._mfq = window._mfq || [];

                    (function() {

                    var mf = document.createElement("script");

                    mf.type = "text/javascript"; mf.async = true;

                    mf.src = "//cdn.mouseflow.com/projects/fb58ebfa-a88c-446d-a4e0-763b8284a3dd.js";

                    document.getElementsByTagName("head")[0].appendChild(mf);

                    })();

                    </script>

                

                

                <!-- begin olark code -->

                    <script type="text/javascript" async=""> ;(function(o,l,a,r,k,y){if(o.olark)return; r="script";y=l.createElement(r);r=l.getElementsByTagName(r)[0]; y.async=1;y.src="//"+a;r.parentNode.insertBefore(y,r); y=o.olark=function(){k.s.push(arguments);k.t.push(+new Date)}; y.extend=function(i,j){y("extend",i,j)}; y.identify=function(i){y("identify",k.i=i)}; y.configure=function(i,j){y("configure",i,j);k.c[i]=j}; k=y._={s:[],t:[+new Date],c:{},l:a}; })(window,document,"static.olark.com/jsclient/loader.js");

                    /* custom configuration goes here (www.olark.com/documentation) */

                    olark.identify('3095-583-10-8217');</script>

                <!-- end olark code -->

       

    <style>

        .container-fluid start_application, .form_content{

      font-family: 'Open Sans', sans-serif;

    }


    .caption {

        display: table-caption;

        text-align: -webkit-center;

    }

    .option:checked {

        display: none;

    }


    </style>  



       

    </head>

    <body>


        <div class="container-fluid start_application" style="margin-left:0px;">

           <div class="row">

                <div class="col-sm-11">

                    <div class="row">

                        <div class="col-xs-12 col-sm-11 col-sm-offset-1 header_application">

                            <div class="col-xs-12 col-sm-10 col-md-10 header_application_title">

                                <h1>Start your application</h1>

                                <br/>

                                <span>Won&prime;t impact your credit score</span>

                            </div>

                            <div class="col-xs-6 col-xs-offset-3 col-sm-offset-0 col-sm-2 col-md-2 col-lg-2 header_application_logo">

                                <img src="{!URLFOR($Resource.Unbounce_Images,'img/GetCapital-logo.png')}" alt="logo0"/>

                            </div>

                            <div class="col-xs-12 col-lg-7 col-sm-12 col-md-7 header_application_status" style="margin-left:25px;">

                                <div class="star_level">Excellent <img src="{!URLFOR($Resource.Unbounce_Images,'img/ratings_5star.png')}" alt="star1"/></div>

                                <div class="number_points"><span>9.7</span>&nbsp;out of 10 TrustScore on</div>

                                <div class="trustpilot"><img src="{!URLFOR($Resource.Unbounce_Images,'img/trustpilot2.png')}" alt="trustpilot2"/></div>

                            </div>

                        </div>

                        <div class="col-xs-12">

                            <div class="row">

                                <div class="col-sm-12 start_application_content"  style="position: relative;width: 100%;min-height: 1px;padding-right: 15px;padding-left: 15px;">

                                    <div class="bg_application_content col-xs-12 col-sm-8 col-lg-8">

                                        <div class="row">

                                            <div class="radio_application col-sm-11">

                                                <div class="radio_application_button col-sm-offset-5">

                                                    <div class="type_query_button">

                                                        <span>1</span>

                                                    </div>

                                                  <div class="horizontal_line"></div>

                                                    <div class="type_query_button">

                                                        <span>2</span>

                                                    </div>

                                                    <div class="horizontal_line"></div>

                                                    <div class="type_query_button">

                                                        <span>3</span>

                                                    </div>

                                                    <div class="description_type_query_button">

                                                        <p>10 min<br>application</br></p>

                                                        <p>Approval<br>within 24 hours</br></p>

                                                        <p>Next Day <br> Funding</br></p>

                                                    </div>

                                                </div>


                                                <table class="col-sm-offset-5">

                                                

                                                <caption style="caption-side:top">What you need</caption>

                                                

                                                <tr>

                                                    <th><img src="{!URLFOR($Resource.Unbounce_Images,'img/chechmark.png')}" alt="chechmark3"/></th><td>9+ Months in business</td>

                                                </tr>

                                                <tr>

                                                    <th><img src="{!URLFOR($Resource.Unbounce_Images,'img/chechmark.png')}" alt="chechmark3"/></th><td>$10K or more sales per month</td>

                                                </tr>

                                                <tr>

                                                    <th><img src="{!URLFOR($Resource.Unbounce_Images,'img/chechmark.png')}" alt="chechmark3"/></th><td>ABN Number</td>

                                                </tr>

                                                <tr>

                                                    <th><img src="{!URLFOR($Resource.Unbounce_Images,'img/chechmark.png')}" alt="chechmark3"/></th><td>Drivers Licence</td>

                                                </tr>

                                                </table>

                                            </div>

                                            <div class="start_application_body col-sm-11">

                                                <span class="help_title">We are here to help</span>

                                                <span>

                                                    <img src="{!URLFOR($Resource.Unbounce_Images,'img/phone.png')}" alt="phone7"/>

                                                    <a href="tel:1300249649" class="Blondie" style="color:#798086">1300 249 649</a>

                                                </span>

                                                <span>

                                                    <img src="{!URLFOR($Resource.Unbounce_Images,'img/email.png')}" alt="email8"/>

                                                    <a href="mailto:getfinance@getcapital.com.au" style="color:#798086;">getfinance@getcapital.com.au</a>

                                                </span>

                                                <!--<span>

                                                    <img src="{!URLFOR($Resource.Unbounce_Images,'img/chat.png')}" alt="chat9"/>

                                                    start live chat

                                                </span>-->

                                            </div>

                                        </div>

                                    </div>

                                    <form   class="form_content" action="https://gcdev-getcapital.cs58.force.com/services/apexrest/UnbounceLeadCreation/" method="POST" target="_top">

                                    

                                        <!--<p>Lead Source</p>-->                                            

                                     

                                        <input type="hidden" name="LeadSource" value="{!$CurrentPage.parameters.LeadSource}"/>

                                        <div class="flex_full_width" >

                                            <div class="field_left">


                                       <p>First Name*</p>

                                 

                                        <input  id="firstname"  name="first_name" type="text" value="" required="true"  />

                                      

                                       

                                        </div>

                                        <div class="field_right">

                                            <p>Last Name*</p>

                                        <input type="text" name="last_name" value="" required="true"/>

                                            </div>

                                        </div>

                                        <div class="flex_full_width">

                                            <div class="field_left">

                                                <p>Business Name*</p>

                                                

                                                 <input  type="text" name="business_name" value="" required="true"/>

                                            </div>

                                            <div class="field_right">

                                                <p>Phone Number*</p>

                                                 <input type="text" name="phone_number"  value="" required="true"/>

                                            </div>

                                        </div>

                                        <div class="field_full_width">

                                            <p>Email*</p>

                                              <input type="text" name="email_address" value="" required="true"/>

                                        </div>

                                        <div class="flex_full_width">

                                            <div class="field_left">

                                                <p>Time in Business*</p>

                                                  <select name="time_in_business" value="" required="true">

                                                 <option selected ="Hidden"></option>

                                                    <option>0 - 9 Months</option>

                                                    <option>More than 9 Months</option>

                                                </select>

                                            </div>

                                            <div class="field_right">

                                                <p>Current Monthly Turnover*</p>

                                                   <input type="text" name="current_monthly_turnover" value="" required="true"/>

                                            </div>

                                        </div>

                                       

                                        <input id="submit_button" type="submit" class="submit_form_content" value="CONTINUE" />

                                         <input id="LeadSource" name="LeadSource" type="hidden" class="hidden" value="Unbounce"/>

                                          

                                        <p align="center" style="font-size:12px">

                                        <span style="color:#9EA3A8;">   By continuing, you agree to our </span><a href="https://www.getcapital.com.au/privacy/"> Privacy Policy.</a>

                                        </p>

                                         <img id="secure_form" src="{!URLFOR($Resource.Unbounce_Images,'img/secure.jpg')}" alt="secure10"/>

                                                        

                                    </form>

                                </div>

                            </div>

                        </div>

                    </div>

                </div>

            </div>

        </div>

        

    </body>

    </html>

    </apex:page>



    THis my code 

  • soujanyadarla
    Replied on February 14, 2019 at 10:24 PM

    How can I make input field border colour is red when user trying to submit form without entering field value? Image 10

    Can you look at once when i click continue its showing blue color i need to red border color should be red when i click continue button


  • roneet
    Replied on February 15, 2019 at 2:03 AM

    Is this something related to JotForm or some other website?

    Do you want to inject CSS code in your Form or salesforce website? The URL which you have provided seems to be a SalesForce one.

    Please confirm us.

    Thanks.