FES css Class

This topic contains 5 replies, has 2 voices, and was last updated by  Stephen Harris 7 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #25842

    I would like to be able to put a background colour on some rows of the FES Form.
    Could you give me a pointer as to what I need to do to achieve that please?

    Chris Hirst
    #25849

    Hi Chris,

    In the form customiser you can specify any classes you want added to element – specify it without the proceeding full-stop (i.e. my-custom-class, not .my-custom-class). It’s added to its containing <div>. You can use those classes to style the corresponding element.

    You can see what I mean if you add custom class and take a look at the source code. Then try:

    .my-custom-class {
       background: red;
    }
    
    Stephen Harris
    #25858

    Thanks for the response.

    I have added my-custom-class to the Css Class box for the phone number on my fes form. Then put
    .my-custom-class {
    background: red;
    }
    in additional css page of my theme, that is where I have put other css to format the odd table.

    Saved everything, then viewed the page that holds to fes and there is no red background.

    The page source shows as below:

    <div class="eo-fes-form-element ">  <label id="eo-fes-form-element-5-label" class="eo-fes-element-label" for="eo-fes-form-element-5"> 
                Event Organiser Phone* </label>
    

    <input
    type=”tel”
    name=”eventorganiser[event_form][5]”
    class=”my-custom-class eo-fes-form-element-type-phone”
    id=”eo-fes-form-element-5″
    value=””
    autocomplete=”off”
    required=”required”
    />

    Event organiser contact phone. This will be available to your customers.

    <hr>

    
    

    </div>

    Do I need to put
    .my-custom-class {
    background: red;
    }
    on a css somewhere?

    Chris Hirst
    #25867

    Ah my, apologies. I had forgotten the class is added to the field not its <div> container. That solution won’t work unfortunately. Alternatively you can do:

    .eo-fes-form-element:nth-child(2) {
      background: blue;
    }
    

    To style the 2nd element blue. This assumes that the position of your form fields will be static.

    Stephen Harris
    #25872

    Thanks for that. I have added all kinds of stuff there now, and my form looks just like a pizza – just what I wanted. Thanks again.

    Can you point me to the template for the email that is sent when a user makes an event submission, using the submission form? It all works just fine, but the template one is blue and I want to change it to match my site colours.

    I have found and edited the email received following a booking, but I do not see the one for the event submission.

    Thanks
    Chris

    Chris Hirst
    #25894

    It’s event-organiser-fes/templates/email-templates/eo-email-template-event-organiser.php

    Stephen Harris
Viewing 6 posts - 1 through 6 (of 6 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.