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

This is how i did it!

{{Form::macro('jradio2', function($name,$id,$value,$checked)
{
    return '<input type="radio" name='.$name.' id='.$id.' value='.$value.' checked='.$checked.' >';

});
}}

{{ Form::open(array('url' => 'gotomobilepage3', 'method' => 'post')) }}

    <div data-role="collapsible">
        <h3>Blootstellingsfrequentie(B)</h3>
   

        <fieldset data-role="controlgroup">
            
             <label for="radio-choice-v-2a">0 Nooit</label>
            {{ Form::jradio2('radio_blootstellingsfreq','radio-choice-v-2a' ,'0',"checked") }} 
             <label for="radio-choice-v-2b">1/2 Zeer zelden {{'(<1x/jaar)'}}</label>
            {{ Form::jradio2('radio_blootstellingsfreq','radio-choice-v-2b' ,'0.5',"") }} 
            <label for="radio-choice-v-2c">1 Zelden{{'(jaarlijks)'}} </label>
            {{ Form::jradio2('radio_blootstellingsfreq','radio-choice-v-2c' ,'1',"") }} 
            <label for="radio-choice-v-2d">2 Soms{{'(maandelijks)'}}</label>
            {{ Form::jradio2('radio_blootstellingsfreq','radio-choice-v-2d' ,'2',"") }}
            <label for="radio-choice-v-2e">3 Af en toen{{'(wekelijks)'}}</label>
            {{ Form::jradio2('radio_blootstellingsfreq','radio-choice-v-2e' ,'3',"") }}
            <label for="radio-choice-v-2f">6 Regelmatig {{'(dagelijks)'}}</label>
            {{ Form::jradio2('radio_blootstellingsfreq','radio-choice-v-2f' ,'6',"") }}
              <label for="radio-choice-v-2g">10 Voortdurend</label>
            {{ Form::jradio2('radio_blootstellingsfreq','radio-choice-v-2g' ,'10',"") }}
        
    </fieldset>

Only thing is the checked property does not work properly.

Last updated 2 years ago.
0

Below that i have:


    </div>
     <div data-role="collapsible">
        <h3>Effect(E)</h3>
        <fieldset data-role="controlgroup">
             <label for="radio-choice-v-2a">0 Geen</label>
            {{ Form::jradio2('radio_effect','radio-choice-v-2a' ,'0',"") }} 
             <label for="radio-choice-v-2b">1 Gering</label>
            {{ Form::jradio2('radio_effect','radio-choice-v-2b' ,'1',"") }} 
            <label for="radio-choice-v-2c">3 Belangrijk</label>
            {{ Form::jradio2('radio_effect','radio-choice-v-2c' ,'3',"") }} 
            <label for="radio-choice-v-2d">7 Ernstig</label>
            {{ Form::jradio2('radio_effect','radio-choice-v-2d' ,'7',"") }}
            <label for="radio-choice-v-2e">15 Zeer Ernstig</label>
            {{ Form::jradio2('radio_effect','radio-choice-v-2e' ,'15',"") }}
            <label for="radio-choice-v-2f">40 Ramp</label>
            {{ Form::jradio2('radio_effect','radio-choice-v-2f' ,'40',"") }}
    </fieldset>

    </div>

    <div data-role="collapsible">
        <h3>Waarschijnlijkheid(W)</h3>

        <fieldset data-role="controlgroup">

           
            <label for="radio-choice-v-2a">1/10 Bijna niet denkbaar</label>
            {{ Form::jradio2('radio_waarschijnlijkheid','radio-choice-v-2a' ,'0.1',"") }} 
             <label for="radio-choice-v-2b">1/4 Praktisch onmogelijk</label>
            {{ Form::jradio2('radio_waarschijnlijkheid','radio-choice-v-2b' ,'0.25',"") }} 
            <label for="radio-choice-v-2c">1/2 Denkbaar, maar onwaarschijnlijke</label>
            {{ Form::jradio2('radio_waarschijnlijkheid','radio-choice-v-2c' ,'0.5',"") }} 
            <label for="radio-choice-v-2d">1 Onwaarschijnlijk, mogelijk in grensgeval</label>
            {{ Form::jradio2('radio_waarschijnlijkheid','radio-choice-v-2d' ,'1',"") }}
            <label for="radio-choice-v-2e">3 Ongewoon</label>
            {{ Form::jradio2('radio_waarschijnlijkheid','radio-choice-v-2e' ,'3',"") }}
            <label for="radio-choice-v-2f">6 Zeer wel mogelijk</label>
            {{ Form::jradio2('radio_waarschijnlijkheid','radio-choice-v-2f' ,'6',"") }}
              <label for="radio-choice-v-2g">10 Te verwachten</label>
            {{ Form::jradio2('radio_waarschijnlijkheid','radio-choice-v-2g' ,'10',"") }}
          
        
    </fieldset>
    

    </div>
    {{Form:: submit("VERDER")}}
         {{ Form::close() }}

    @stop

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

JeffreyR jeffreyr Joined 11 Feb 2014

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.