Support the ongoing development of Laravel.io →
posted 7 years ago
Forms
Last updated 2 years ago.
0

Can you please show me the html view/code of this form along with these code? it would be easier to debug and find the issue.

0

Custom macro:

        Form::macro("select_nh", function($id, $selected, $attrs){
            $vals = array(1, 2, 3, 4, 5);
            $arr = array();

            foreach($vals as $v){
                $arr[$v] = "$v h";
            }

            return Form::select($id, $arr, $selected, $attrs);
        });

View:

{{ Form::select_nh('n-h', 2, ["class" => "required"]) }}
Last updated 7 years ago.
0

I just found an url parameter was modifying default value...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Juan Antonio Juan Antonio looper Joined 3 Jul 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.