I need Help with some CSS
-
Hi!! good afternoon, i need some help with the review form please, im looking to make the form to look like this:
thanks in advance for your help. and this plugin is my favor π
-
These type of adjustments are generally outside the scope of support.
However, send me the URL to your website and I will take a look.
and thanks for your help!! i can doit if you can talk me how to add class to the name and email form please
First, please update to v3.1.5 which fixes using custom templates.
Next you have a couple of options:
1. You can use the “site-reviews/rendered/field/classes” hook to add your own classes to each field. For example:
/** * Adds additional CSS classes to the name and email fields of the submission form * Paste this in your active theme's functions.php file. * @param array $classes * @param array $field * @return array */ add_filter( 'site-reviews/rendered/field/classes', function( $classes, $field ) { foreach( ['name', 'email'] as $path ) { if( !isset( $field['path'] ) || $field['path'] != $path )continue; $classes[] = 'glsr-field--'.$path; } return $classes; }, 10, 2 );You can now use
.glsr-field--name {}and.glsr-field--email {}in your CSS.2. You can use also custom templates for the form and each of the field types. This gives you much more control over the HTML structure of the form and fields.
The first thing you will need to do is copy over the “templates” directory from the Site Reviews plugin to your theme. After you have copied it over, rename the copied folder to “site-reviews”. If you have done this correctly, the path to the templates folder in your theme should look something like this:
/wp-content/your-theme/site-reviewsFinally, delete any template files in that folder that you are not going to customise.
form/field.phpwill be used for all fields unless there exists a specific field type file (see below).To target a specific field type, you can duplicate the
form/field.phpfile and add a field type suffix to the file name. For example:form/field_email.phpwill be used for all fields that contain a<input type="email">form/field_checkbox.phpwill be used for all fields that contain a<input type="checkbox">form/field_textarea.phpwill be used for all fields that contain a<textarea>So, using custom templates, you could do something like this to match your Gravity Forms plugin:
/wp-content/your-theme/site-reviews/reviews-form.php
<?php defined( 'WPINC' ) || die; ?> <div class="gform_wrapper glsr-form-wrap"> <form class="{{ class }}" id="{{ id }}" method="post" enctype="multipart/form-data"> {{ fields }} {{ response }} {{ submit_button }} </form> </div>/wp-content/your-theme/site-reviews/form/field.php
<?php defined( 'WPINC' ) || die; ?> <div class="gfield glsr-field {{ class }}"> {{ label }} <div class="ginput_container"> {{ field }} </div> {{ errors }} </div>-
This reply was modified 7 years, 5 months ago by
Gemini Labs.
-
This reply was modified 7 years, 5 months ago by
Gemini Labs.
-
This reply was modified 7 years, 5 months ago by
Gemini Labs.
-
This reply was modified 7 years, 5 months ago by
Gemini Labs.
Niceee !! got it !! thanks for all your help and this Amazing Plugin !! thanks buddy
Great! May I mark this as resolved?
oh i already did lol
i know is mark Resolved but i just like to say THANK YOU !! Thankss , the #1 work 150%, Thanksss π
-
This reply was modified 7 years, 5 months ago by
The topic ‘I need Help with some CSS’ is closed to new replies.