This is an identical issue to the one I described in in this thread.
On page 198, the survey form LiveComponent is described using a syntax that appears to no longer work. The workaround is simple, but as mentioned in the other thread, the live view code may need to be revamped to work with current LiveView best practices.
To implement the easy workaround, modify the field
attribute in the following file to use the syntax shown in the current LiveView docs.
lib/pento_web/live/demographic_live/form.html.heex
Change this:
<.input
field={{f, :gender}}
type="select"
label="Gender"
options={Pento.Survey.Demographic.gender_options()}
/>
<.input
field={{f, :year_of_birth}}
type="select"
label="Year of birth"
options={Enum.reverse(1900..2023)}
/>
To this:
<.input
field={f[:gender]}
type="select"
label="Gender"
options={Pento.Survey.Demographic.gender_options()}
/>
<.input
field={f[:year_of_birth]}
type="select"
label="Year of birth"
options={Enum.reverse(1900..2023)}
/>