This topic is locked
[SOLVED]

 css class for checkbox field

4/7/2019 12:47:46 PM
PHPRunner General questions
G
Grdimitris author

I took this excellent CSS3 tip from this page

apple style checkbox
In Editor go to Custom CSS and add the following
input.apple-switch {

position: relative;

-webkit-appearance: none;

outline: none;

width: 50px;

height: 30px;

background-color: #fff;

border: 1px solid #D9DADC;

border-radius: 50px;

box-shadow: inset -20px 0 0 0 #fff;

}
input.apple-switch:after {

content: "";

position: absolute;

top: 1px;

left: 1px;

background: transparent;

width: 26px;

height: 26px;

border-radius: 50%;

box-shadow: 2px 4px 6px rgba(0,0,0,0.2);

}
input.apple-switch:checked {

box-shadow: inset 20px 0 0 0 #4ed164;

border-color: #4ed164;

}
input.apple-switch:checked:after {

left: 20px;

box-shadow: -2px 4px 3px rgba(0,0,0,0.05);

}
In javascript onload add the following
var applecheck=Runner.getControl(pageid,'check'); // checkbox field

applecheck.addClass('apple-switch');
works but i feel is not the perfect way

Can anyone knows where is in themes that Phprunner uses the class for checkboxes to change permanent the appearance of checkbox.

admin 4/8/2019

If you want to change the way all checkboxes appear in your application instead of input.apple-switch use input[type='checkbox']

G
Grdimitris author 4/8/2019

Thanks. It works perfectly.