Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hi setting-fields #154

Closed
stormtr opened this issue Aug 7, 2019 · 3 comments
Closed

hi setting-fields #154

stormtr opened this issue Aug 7, 2019 · 3 comments

Comments

@stormtr
Copy link

stormtr commented Aug 7, 2019

we used a below section to make checkbox but its not working can you check it. is there any problem

<input name="{{ $field['name'] }}" value="1" type="checkbox" @if(old($field['name'], setting($field['name']))) checked="checked" @endif >

        'elements' => [
            [
                'type'  => 'checkbox',
                'data'  => 'int',
                'name'  => 'mac',
                'label' => 'Mac Control',
                'rules' => '',
                'class' => 'switch-input',
                'value' => '1',
            ],
@stormtr
Copy link
Author

stormtr commented Aug 7, 2019

for example i need to make here true / false

@stormtr
Copy link
Author

stormtr commented Aug 8, 2019

for checkbox use like below its working:

        [
            'type'  => 'checkbox', // input fields type
            'data'  => 'boolean', // data type, string, int, boolean
            'name'  => 'Name', // unique name for field
            'label' => 'Name Label ', // you know what label it is
            'rules' => '', // validation rule of laravel
            'class' => 'form-control switch-input', // any class for input
            'value' => '1', // default value if you want
        ],
{{ $field['label'] }} ({{ $field['name'] }})
{{Form::hidden($field['name'],0, null,null)}} {{Form::checkbox($field['name'], null, old($field['name'], setting($field['name'])), array('class'=> $field['class']))}} @if ($errors->has($field['name'])) {{ $errors->first($field['name']) }} @endif

@stormtr stormtr closed this as completed Aug 8, 2019
@nasirkhan
Copy link
Owner

nasirkhan commented Aug 8, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants