Static mediaΒΆ

Pancake includes a suite of CSS and JavaScript files to assist in the rendering of your forms. The use of these files is entirely optional, but is encouraged. Call the method Pancake::resources() to include the relevant <link> and <script> tags in the <head> of your document.

<head>
    <title>Contact Us</title>

    <?= $form->resources() ?>
</head>

The file paths to the CSS and JavaScript files are set in CSS_PATH and JS_PATH respectively. The files are stored in Pancake/Resources. You can either symlink or copy the files to a public file path.

The CSS files include styles for all of the included Pancake fields. Labels are positioned above the form-field input elements. The files do their best to rely on the webpage’s existing styles, e.g. font family, font size, margins, paddings.

The JavaScript files set up calendar inputs—using jQuery Datepicker—and provide enhanced behaviour for ‘Other’ options in field lists, such as automatically selecting the associated checkbox/radio button when the user enters a value into the text <input>.

Previous topic

Security

Next topic

References

This Page