web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

How can we change the colour of the 'Submit' button

(0) ShareShare
ReportReport
Posted on by

I am trying to change the colour of the 'Submit' button (not other buttons which can be easily changed). It appears that we need to do it from HTML. Can anyone help/advise how i can do it or what i need to change as i don't have any coding experience. 

I have the same question (0)
  • Suggested answer
    Dsouza_28 Profile Picture
    7 on at
    RE: How can we change the colour of the 'Submit' button

    Hi GraceC ,

    No worries, no coding is required for this task  

    When you are on the marketing form, switch to the HTML tab and search for:

    form button [type="submit"] - this will usually be in the first half of the HTML code

    please see the screenshot:

    pastedimage1652973252211v1.png
    In the background color input the required HEX color code or the RGB code. 
    Let me know if it works, by accepting this as a verified answer. 
    Thanks. 
     
  • GraceC Profile Picture
    on at
    RE: How can we change the colour of the 'Submit' button

    Hi Roy, there's no background-color for the Submit button... only border that I could change but i need to change the entire background colour . See below html:

    <form data-template-id="c8453286-d610-4f84-9b28-ed82da4cf8e1" class="one-column-form" data-container="true">

    <style>

     div[data-editorblocktype=Field-radioButtons] {

      width:25%;

     }

     div[data-editorblocktype=Field-radioButtons] input {

      width: auto;

      height: auto;

      margin-bottom: 3px;

      float: right;

     }

     div[data-editorblocktype=Field-checkboxList] input,

     div[data-editorblocktype=Field-checkbox] input  {

      width: auto;

      height: auto;

      margin-bottom: 3px;

      margin-right: 8px;

      float: left;

     }

     div[data-editorblocktype=Field-checkboxList] span.lp-checkboxListItem,

     div[data-editorblocktype=Field-radioButtons] span.lp-radioButton {

      /* This rule is needed to style all radio button fields. For product constraints each option is defined as input and label wrapped into a span*/

      display: block;

      margin: 2px;

     }

     form {

      padding: 22px;

      margin: 0 auto;

     }

     .one-column-form {

      max-width: 450px;

     }

     .lp-form-header {

      font-weight: bold;

      margin-bottom: 21px;

     }

     label {

      margin: 0;

     }

     input {

      border-radius: 3px;

      border: 1px solid #333333;

      height: 40px;

      width: 100%;

      margin-bottom: 28px;

      text-indent: 10px;

     }

     input[type="radio"] {

      width: 1.5em;

      height: 1.5em;

      display: inline-block;

      margin: 0 5px 0 0;

     }

     input[type=checkbox] {

      width: 1.5em;

      height: 1.5em;

      display: inline-block;

      margin: 0 5px 0 0;

      vertical-align: middle;

     }

     select {

      border-radius: 3px;

      border: 1px solid #333333;

      height: 40px;

      width: 100%;

      margin-bottom: 28px;

     }

     textarea {

      border-radius: 3px;

      border: 1px solid #333333;

      width: 100%;

      margin-bottom: 28px;

      height: 120px;

      overflow: auto;

     }

     button {

      border-radius: 3px;

      border: 1px solid #fa7c1e;

      width: 100%;

      overflow: hidden;

      text-overflow: ellipsis;

      height: 60px;

      vertical-align: bottom;

      margin-top: 12px;

      font-weight: bold;

      text-transform: uppercase;

     }

    </style>

    <div class="wrapperContainer" data-container="true">

     <div data-editorblocktype="Text">

      <p class="lp-form-header">

       [Form heading]

      </p>

     </div>

     <div data-editorblocktype="Field-text">

      <div class="marketing-field">

    <div class="lp-form-field">

     <label class="lp-label lp-ellipsis" for="3f746946-34b4-442c-a677-e232cdd2bc40" title="">

         First Name

     </label>

     <input class="lp-form-fieldInput" id="3f746946-34b4-442c-a677-e232cdd2bc40" name="3f746946-34b4-442c-a677-e232cdd2bc40" placeholder="First" title="" type="text" value="">

    </div>

      </div>

     </div>

     <div data-editorblocktype="Field-text">

      <div class="marketing-field">

    <div class="lp-form-field">

     <label class="lp-label lp-ellipsis" for="e1dfc514-f301-4cb2-855a-4c8fa8331207" title="">

         Last Name

     </label>

     <input class="lp-form-fieldInput" id="e1dfc514-f301-4cb2-855a-4c8fa8331207" name="e1dfc514-f301-4cb2-855a-4c8fa8331207" placeholder="Last" title="" type="text" value="">

    </div>

      </div>

     </div>

     <div data-editorblocktype="Field-email">

      <div class="marketing-field">

    <div class="lp-form-field">

     <label class="lp-label lp-ellipsis" for="7f685ebb-7c54-4cff-a1bc-772562d25c38" title="">

         Email

     </label>

     <span class="lp-required" style="color: rgb(255, 0, 0);">

         *

     </span>

     <input arai-required="true" class="lp-form-fieldInput" id="7f685ebb-7c54-4cff-a1bc-772562d25c38" name="7f685ebb-7c54-4cff-a1bc-772562d25c38" placeholder="Email" required="required" title="" type="email" value="">

    </div>

      </div>

     </div>

    </div>

    <div class="wrapperContainer" data-container="true">

     <div data-editorblocktype="SubmitButtonBlock">

      <div class="lp-form-field">

    <button class="lp-form-button lp-form-fieldInput" name="submit2a115e8b-ee65-4c7c-bdc0-87a08982bd7e" type="submit">

        Submit

    </button>

      </div>

     </div>

    </div>

    </form>

  • Dsouza_28 Profile Picture
    7 on at
    RE: How can we change the colour of the 'Submit' button

    Hi GraceC,

    can you please share a screenshot of the Form?

  • GraceC Profile Picture
    on at
    RE: How can we change the colour of the 'Submit' button

    pastedimage1653058264620v1.png

  • Suggested answer
    Dsouza_28 Profile Picture
    7 on at
    RE: How can we change the colour of the 'Submit' button

    Hi GraceC ,

    okay, please follow the steps:

    Navigate within the HTML of the form and find Button array. 

    Then add a line : background-color: #xxxxx (the color code you need) 

    see below:

    pastedimage1653062312629v1.png

    The result in the Designer now should look like this:

    pastedimage1653062356711v2.png

  • Suggested answer
    GraceC Profile Picture
    on at
    RE: How can we change the colour of the 'Submit' button

    Hi thanks, this worked though in other forms i need to add the other lines of code.

  • Dsouza_28 Profile Picture
    7 on at
    RE: How can we change the colour of the 'Submit' button

    Hi GraceC ,

    that's good to know.

    Yes it depends on the chosen templates, the HTML changes.

    *please mark verified for the answer that helped solve the issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 178

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 142 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans