Jump to content

Making required fields stand out... A quick 'howto'


twhiting9275

Recommended Posts

Here's one that I've found useful over the years. Pretty easy to do. Make those 'required' fields stand out when it comes to ticket submissions.

Step 1: The template

 

Open up whmcs/templates/template/supportticketsubmit-customfields.tpl . Replace the whole thing with this:

 

<div class = "form-group">
               <hr>
               <label class="col-sm-3 control-label" for="customfield{$customfield.id}">Custom Fields</label>
                               <div class="col-sm-6">
                               <p class="help-block">The following custom fields are available. Those marked in <b><font color="red">red</font></b> are required</p>
                               </div>
               </hr>
</div>
{foreach key=num item=customfield from=$customfields}
       <div class="form-group">
{if $customfield.required}
               <label class="support-required control-label" for="customfield{$customfield.id}">{$customfield.name}</label>
{else}
               <label class="col-sm-3 control-label" for="customfield{$customfield.id}">{$customfield.name}</label>
{/if}
               <div class="col-sm-6">
                       {$customfield.input}
                       {if $customfield.description}
                               <p class="help-block">{$customfield.description}</p>
                       {/if}
               </div>
       </div>
{/foreach}

 

Step two: Add the following to templates/templatename/css/custom.css

 

 .support-required {
 width: 25%;
 color: red;
 font-weight:bold;
 float: left;
 min-height: 1px;
 padding-left: 15px;
 padding-right: 15px;
 position:relative;
 }

 

Adjust the color and fields as necessary

 

See, told you it was easy :)

 

Enjoy

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated