This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Common CSS file for all forms


  1. cybermatic
    Member

    Hi,

    Just wondering if there is a way to use a common CSS file for all forms?

    At the moment, for every form that is created, so is a new CSS file. Considering I'm using 3-4 different forms on the same website I don't want to update each individual CSS file when making a change to the way the form is styled.

    I just want to change 1 CSS file and have the changes affect all forms.

    Thanks a lot. :)

    Posted 14 years ago #
  2. redityo

    Hi There,

    Basically you can edit the "view.css" file in machform root folder. So when you create a new form, the css file will be copied with the latest changes.
    Otherwise, you can make 1 form as css code referrer. For example, you have 3 forms with id 1,2,3. And you will use form 1 as the referrer. To do this, you need to edit "view-functions.php" file. Then search for these code :

    $css_dir = DATA_DIR."/form_{$form_id}/css/";

    then change the code to

    $css_dir = DATA_DIR."/form_1/css/";

    That would make another form will always use "form 1" as css code. But you need to always keep the form 1, if you delete form 1, you will loose all css code also.


    MachForm Support

    Posted 14 years ago #
  3. cybermatic
    Member

    Hi,

    I think the later would work better. I only ever want to update the one CSS file and have the changes replicate to all forms. If that means having a form sitting there purely for the CSS than so be it.

    Thanks a lot for the quick reply. :)

    Posted 14 years ago #

RSS feed for this topic

Reply