Setting and clearing field values on button press.

Setting and clearing field values on button press.

Hi People,

I seem to be having an issue setting values upon a button press (in a stateless form). Defining a field's value works fine if the code is run "On User Input" or "On Load" however "On Click" does not set values. An example line would be
  1.  input.text_field = null; 
which would normally clear the field but if called "On User Input" does nothing.

Is this intended functionality or a bug? In any case, would anyone know of a workaround that still allows me to use buttons to define/clear fields?

Regards.