• Resolved dthimsen

    (@dthimsen)


    I like the CFF template 2 layout but not the colors. Since changing the colors would require a lot of CSS override work on about 8 different CFF forms (or moving the CSS updates out to the theme customization CSS), I decided to create a new template (14) by copying the template 02 to:

    /var/www/html/wp-content/plugins/calculated-fields-form/templates/14

    I’ve also updated the style.css and config.ini files to use a new class name. This seems to work just fine…

    Questions, will any updates to CFF orphan the new template? Or, could there changes that might occur in the base code that would eventually require updates to all the templates and I’d have to manually apply updates to the new template at some point.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @dthimsen

    If you include the template files into the files’ structure of the plugin, unfortunately would be deleted by the plugin’s updates, because the WordPress replace the plugin’s files by the new ones.

    The alternative would be upload the files to another directory, for example, into the “/content/uploads/my-template”

    and then into the “Customize Form Design” attribute in the “Form Settings” tab, you simply should to enter an @import command to use your own css file:

    
    @import url("https://www.yourwebsite.com/wp-content/uploads/my-template/style.css");
    

    Best regards.

    Thread Starter dthimsen

    (@dthimsen)

    Thank you very much!

    Thread Starter dthimsen

    (@dthimsen)

    I’ve been trying your suggestion and cannot get the my custom template to work. First off, I assume you only need to the style.css file in the wp-content/uploads folder. Note: The only change in this style from the default 02 is one of the background color values which should produce a very noticeable effect . Here’s a link to the style.css:

    https://test.jonesbrothersmarine.com/wp-content/uploads/jbm-cff-template/style.css

    At first, I left the template 02 in the CFF definition thinking that the @import would override the default template. When that didn’t work, I switched back to the default template and tried to manual set the class by adding it to the shortcode:

    [CP_CALCULATED_FIELDS id="7" class="cp_cff_professional"]

    Here’s a link to a test page (expand pricing to see the form):

    https://test.jonesbrothersmarine.com/jbm_capefish23.htm

    Any suggestions?

    Thanks,
    Don

    Plugin Author codepeople

    (@codepeople)

    Hello @dthimsen

    The issue is simple, if your page is protected with https, the resources must to be loaded with https too:

    
    @import url("https://test.jonesbrothersmarine.com/wp-content/uploads/jbm-cff-template/style.css");
    

    Or the browsers don’t load the resources for security reasons.

    Best regards.

    Thread Starter dthimsen

    (@dthimsen)

    That worked… Thanks you!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Adding a custom template’ is closed to new replies.