oTree Forum >

hidden input

#1 by nathalieroemer

Hi everyone,

I am using a hidden input field, but the value isn't passed. Does someone see why? I am thankful for any hint!

Here is the code from the html:
  <td> <input  type="hidden" name="pref{{self}}" id="pref{{self}}" value="0"> </td>
  
 Thanks for your help,
 Nathalie

#2 by Student

Show what's in form_fields = [] in the class you call the template from.

#3 by nathalieroemer

Hi, I think i figured it out:
I had the form field also inside a div, that I did not display. So I guess, if you have a form field, adding the hidden input doesn't work ?

Write a reply

Set forum username