LiveCal
This commit demonstrates how to conditionally show and hide a nested input within Phoenix.Component.inputs_for/1
based on the value of a sibling nested input.
To see it in action:
- Navigate to
http://localhost:4000/calendars/new
- Click
add event
- Select
field trip
from the type dropdown
There should now be a destination
text input field underneath the dropdown.
To start your Phoenix server:
- Run
mix setup
to install and setup dependencies - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.