There’s no simple_form/1 in phoenix 1.8
So this code
<div>
<.simple_form
for={@form}
id="promo-form"
phx-change="validate"
phx-submit="save"
>
<.input field={@form[:first_name]} type="text" label="First Name" />
<.input
field={@form[:email]}
type="email"
label="Email"
/>
<:actions>
<.button phx-disable-with="Sending...">Send Promo</.button>
</:actions>
</.simple_form>
</div>
Doesn’t’ work.
Changing simple_form to form gets you halfway to a fix, you also have to remove the actions slot. I’ve not tested in 1.7.* release series but this works in 1.8.
<div>
<.form
for={@form}
id="promo-form"
phx-change="validate"
phx-submit="save"
>
<.input field={@form[:first_name]} type="text" label="First Name" />
<.input
field={@form[:email]}
type="email"
label="Email"
/>
<.button phx-disable-with="Sending...">Send Promo</.button>
</.form>
</div>
edit: a little later on on page 169 simple form is also referenced again as a place to add entry information for the file uploads (which is also in the older <%= style of syntax.