Fix incorrect append of the 'before' value.
write tests for InputField