'Get or set the value of a text field.'

def value_for_text_field(self, field_id, value=None, press_enter=True):

    self.wait_for_field(field_id)
    query = self.q(css='.u-field-{}    input'.format(field_id))
    if (not query.present):
        return None
    if (value is not None):
        current_value = query.attrs('value')[0]
        query.results[0].send_keys((u'\ue003' * len(current_value)))
        query.results[0].send_keys(value)
        if press_enter:
            query.results[0].send_keys(u'\ue007')
    return query.attrs('value')[0]
