Set value attribute on input tags of created items.
Added more testcases.