Niyaz
15
14
Laravel

How to implement different condition for different dropdown in form

Posted 4 months ago by Niyaz

Hi, i am doing a project in laravel which i need implement different condition for different dropdown (select option) Like , this is my 1st dropdown list option

{{ Form::select('category_of_works', ['0' => 'Minor Works', '1' => 'Major Works'], null , ['class' => 'form_control'])  }}

and this is my 2nd dropdown list option

{{ Form::select('community_id',[ '1' => 'Project1', '2' => 'Project2', '3' => 'Project3' , '4' => 'Project4'],null ,['class' => 'form-control'] ) }}

My query is if i select "minor works" from 1st dropdown and "Project2" from 2nd dropdown i have to get a sentence like "Your deposit is huge" in my terms and condition

And my Terms and condition is

<label class="col-xs-3 control-label">Terms and Conditions</label> 
                            <div class="col-xs-9">
                                <div class="agree-terms">  
<ul>
<li>I understand xxxxxxxxxxxxxx.</li>
                                        <li>I confirm that xxxxxxxxxxxxxxxxxxxxxx</li>
                                        <li>I confirm that xxxxxxxxxxxxxx.</li>
 </ul>
                                </div>
                            </div>

Perviously, i have similar condition for one dropdown and i did it by javascript and query . But now i have it for 2 dropdown and i dont know how to proceed it.

Can anyone help me to solve it as i can do it by query or by laravel( php) ?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.