dewie
Liveview heex template variable scope errror
I have a problem with variable scopes in a heex template (phoenix 1.7 rc1)
#<%= inspect @record.view_item_id %>#
<label><%= gettext("Column") %>:</label>
<select name="view_item_idasdfdf_dadf" class="">
<%= for item <- @columns do %>
<option value={item.id}>
<%= item.label.nl %>#<%= @record.view_item_id %>#
</option>
<% end %>
</select>
The assigns in the select element don’t work, resulting html output:
<div class="form-group">
#"5503d42e64657647e0000000"#
<label>Column:</label>
<select name="view_item_idasdfdf_dadf" class="">
<option value="5503d42e64657647e0000000" selected="">Klant##</option>
<option value="5503c2c064657637f4010000">Soort##</option>
<option value="55efd0cc0c08dc13b3000000">Kenmerk##</option>
<option value="5503c2e464657637f4050000">Omschrijving##</option>
<option value="588c69a20c08dc7676000000">Serienummer##</option>
<option value="56115aa20c08dc27f1000000">Status##</option>
</select>
</div>
Anyone an idea ?
Marked As Solved
dewie
Fixed, it was in a .modal component and the first select get’s the focus so won’t change …
Popular in Questions
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it.
I’m very interested in Elixir,...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Student & New to elixir. Nice language.
I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
Hey guys.
I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Other popular topics
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this
"1000"
What is the ...
New
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New







