Good…
I am currently trying to use phoenix_simple_form.
But I’m having some difficulties integrating with phoenix.simple_form.
templates/name/form.html.eex
Note: city_id = Database MySQL
Has anyone used this in elixir?
As?
Good…
I am currently trying to use phoenix_simple_form.
But I’m having some difficulties integrating with phoenix.simple_form.
templates/name/form.html.eex
Note: city_id = Database MySQL
Has anyone used this in elixir?
As?
Usually helps to say what error you are getting. ^.^
Cannot tell what is wrong with the code given.
Also, this forum uses standard markdown for formatting, so you can use code fences ``` on blank lines to format the code, like:
```
<%= label f, :city_id, class: “control-label” %>
<%= text_input f, :city_id, class: “form-control” %>
<%= error_tag f, :city_id %>
```
Becomes:
<%= label f, :city_id, class: "control-label" %>
<%= text_input f, :city_id, class: "form-control" %>
<%= error_tag f, :city_id %>
It does not make mistake.
The code is right.
I want to add only a list type button.
About formatting, thank you.
Well, the question still a little bit confusing.
What do you intent to do? Do you have any example?
Checking an image, will make it easier to understand …
I needed a button like that on my page.
Right! So the function you want is select/4
You can use it like this:
<%= label f, :city_id, class: "control-label" %>
<%= select(form, :city_id, ["New York": "ny", "San Francisco": "sf"]) %>
<%= error_tag f, :city_id %>
Se precisar de algo a mais é só falar! Mas em inglês pra galera não se perder.
Also, @gilbertosj, there is the brazillian elixir group on telegram if you are interested: https://telegram.me/elixirbr
that’s right…
Thank you so much