0

I am using Jinja and am trying to set the "value" of the option to a variable. I tried this: <option value = {{stock['name']}}>{{stock['name]}}</option>, but it thinks that the {{stock['name'is a string, and the bits after that are normal. Does anyone know how I can fix this?

1
  • it appears to be missing a closing ' here {{stock['name]}} Commented Jun 14, 2020 at 12:14

1 Answer 1

0

Thank you, I already found the answer. Dinocodersaurus, that was a typo, and I already had included the closing ' in my actual code. The solution was to simply add spaces, so it was value = {{ stock['name'] }}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .