Forum
Form CSS styling
Hi there,
I have applied a css style to both the the form and also to various form elements but the css is stripped away.
Is there any way to add CSS?
DEFAULT CSS - the default code without perch tags added.
<form class="uk-form">
<div class="uk-form-row">
<label class="uk-form-label" for="form-s-ip">Name</label>
<div class="uk-width-3-4">
<input id="form-s-ip" type="text" placeholder="Text input">
</div>
</div>
</form>
PERCH TAGS - updated with perch tags
<perch:form id="form-contact" class="uk-form" method="post" app="perch_forms">
<div class="uk-form-row">
<perch:label for="name" class="uk-form-label">Name</perch:label>
<div class="uk-width-3-4">
<perch:input type="text" id="name" required="true" label="Name" />
</div>
</div>
</perch:form>
Thanks in advance. Alec
Hi Alec, you should find that all the classes stay intact. I've just placed your code into a form of mine and found that to the the case.
If you are using the form in 'perch content' method as opposed to 'perch forms' make sure you go to perch admin and re-save the region after making any changes to the form template.
Hi Simon,
You are correct, i was required just to re-save the region :)
Thank you for your help, much appreciated
Alec
Great :)