How to change form element value?

given this code:

<?php
$form->get('a')->getValue(); // return 1
$form->get('a')->setDefault('2');
$form->get('a')->getValue(); // return 1, instead of 2

the last line returns an unexpected result, it still returns 1 instead of 2. setValue() doesnt even exists.

edited May '16

on your controller:

    $this->tag->setDefault("yourInputID", "yourvalue");