We will explore and re-create this example
-
First download the source files with skeleton code for our view
- Source
- cd ~/Downloads
- wget http://cs.colostate.edu/~ct310/yr2020sp/recitations/Lab12/lab12skeleton.tar
- tar -xvf lab12skeleton.tar
-
Next put the source files in the correct locations
- Move the file inside of "controller" titled "fuelformexample.php" to ~/fuel/app/classes/controller
- mv controller/fuelformexample.php ~/fuel/app/classes/controller
- Move the file inside of "model" titled "fuelformexample.php" to ~/fuel/app/classes/model
- mv model/fuelformexample.php ~/fuel/app/classes/model
- Rename the directory: "fuelformexample_css" to "fuelformexample" and put it in ~/local_html/ct310/assets/css
- mv fuelformexample_css ~/local_html/ct310/assets/css/fuelformexample
- Update the permissions on local_html
- chmod -R 755 ~/local_html
- Rename the directory: "fuelformexample_views" to "fuelformexample" and put it in ~/fuel/app/views
- mv fuelformexample_views ~/fuel/app/views/fuelformexample
- Rename the file "~/fuel/app/views/mainview.skeleton.php" to "mainview.php"
- mv ~/fuel/app/views/fuelformexample/mainview.skeleton.php ~/fuel/app/views/fuelformexample/mainview.php
- Visit your app at: https://cs.colostate.edu:4444/~EID/ct310/index/fuelformexample
-
Now fill out the skeleton code using fuel forms so that it looks like the html form version.
- I already got you started with the Form::open and Form::close tags.
- Read the fuel docs to figure out what elements you need to insert.
- https://fuelphp.com/docs/classes/form.html
- When you're done submit the link to your fuel app on Canvas under lab 12.