Video instructions and help with filling out and completing Which Form 2220 Toggle

Instructions and Help about Which Form 2220 Toggle

Hello friends this video tutorial we are going to learn how to make stylish toggle checkbox by using bootstrap toggles query plugin and after this how can we pass value of that stylish toggle checkbox value via forum and insert data into MySQL table by using Ajax with PHP if we have used bootstrap library then this plugin can be very easily integrate with our web development environment this is very highly flexible bootstrap plugin that converts check boxes into toggle button suppose we have any web application with stylish user interface then we can use this plugin because suppose we have used simple checkbox interface that is very common in any web application but if we have used the stylish toggle checkbox then it will provide something unique to your web application here we will discuss how to integrate this bootstrap toggled query plugin into our developing environment and after this how can we past this stall checkbox value for server-side operation you now let's start learning this topic this are testing database and in this we have one users table with three table column like head name and gender we insert data into this table and here gender table column data will be get from stylish toggle check boxes this is our index page and on this page we have include JavaScript libraries query and bootstrap web development library also in fourth link we have include bootstrap toggle JavaScript file and in last link we have include bootstrap toggle style sheets file first we want to make one HTML form so we have right form tag with attribute method is equal to post and it is equal to insert data we will use the SID value and query code as selector under this form first we have write input type is equal to text what name is equal to name and it is equal to name under the stashed box we can enter user name after this we want to define one checkbox for select gender so we have right input type is equal to checkbox with attribute name is equal to gender and it is equal to gender and we have right checked attribute that means this checkbox will always checked then after we have defined one hidden field with attribute name is equal to hidden gender it is equal to hidden gender and in value attribute we have write male we will store gender checkbox' value into this field and pass this tag value for insert data and to table lastly we want to create one submit button for Sendas form data to server so we have write input type as equal to submit name is equal insert it was equal to action and value is equal to insert now we have goat it's query code and under this first we want to initialize bootstrap toggle plug-in via JavaScript so here we have write checkbox had gender with bootstrap toggle method this method will initialize plugin feature on gender checkbox and convert into stylish toggle button so we have saved this code uncheck output in browser friends we can see when page has been loaded into browser then we can see that form with one text box submit button and check box has been converted into stylish toggle button with value on and off but in place of on and off we want to write male and female so we go to index page in here in bootstrap toggle method we have wrote on option and in this we have write male so this male text will be display instead of untaxed same way in place of off text we want to display female text so we have write-off option with text female so it will display female text in place of off now we have go to browser and check output first we have refreshed page and after refresh of page we can see on and off text has been replaced with male and female toggle button now we want to change color of this toggle button so we have a gain go to query bootstrap toggle method and in this we have write on style option and in thus we have write success this will change background color of make button to green that means here we have used bootstrap success button class after this we want to change female button background color to red so here we have write-off style option and in this we have write danger this will change female button background to red now have check effect of this code so here we have refresh page and after refresh of page we can see that checkbox toggle button background color has been changed like male button color change to green and female button color has been changed to red after this we want to assign value of select agenda checkbox that hidden gender tag so here we have right dollar with checkbox and gender with changed method so when we have toggle button this code will execute under this we have right of statement and under condition we have right dollar with this selector with prompt method and under this method we have right checked this condition will check we have toggle gender checkbox or not so suppose we have changed gender toggle button then it will return true and it will execute if block of code otherwise it will execute tells block of code suppose above condition return true then it will execute if block of code and under this we have right dollar with hidden target hidden gender with value method and under this we have write male so here we have assigned male value to hidden gender tag same way suppose above condition false down and we'll execute tells block of code and under this we have write dollar with it hidden gender with value method and under this we have write female so here we

100%
Loading, please wait...