Set the element values in the definition_after_data function rather than the constructor