icon for lab

CT310

Recitation 12 - FuelPHP: Forms

In this recitation, we will:


We will explore and re-create this example

  1. 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
  2. Next put the source files in the correct locations
    1. Move the file inside of "controller" titled "fuelformexample.php" to ~/fuel/app/classes/controller
    2. mv controller/fuelformexample.php ~/fuel/app/classes/controller
    3. Move the file inside of "model" titled "fuelformexample.php" to ~/fuel/app/classes/model
    4. mv model/fuelformexample.php ~/fuel/app/classes/model
    5. Rename the directory: "fuelformexample_css" to "fuelformexample" and put it in ~/local_html/ct310/assets/css
    6. mv fuelformexample_css ~/local_html/ct310/assets/css/fuelformexample
    7. Update the permissions on local_html
    8. chmod -R 755 ~/local_html
    9. Rename the directory: "fuelformexample_views" to "fuelformexample" and put it in ~/fuel/app/views
    10. mv fuelformexample_views ~/fuel/app/views/fuelformexample
    11. Rename the file "~/fuel/app/views/mainview.skeleton.php" to "mainview.php"
    12. mv ~/fuel/app/views/fuelformexample/mainview.skeleton.php ~/fuel/app/views/fuelformexample/mainview.php
    13. Visit your app at: https://cs.colostate.edu:4444/~EID/ct310/index/fuelformexample
  3. 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.