'This method retrieves all the user-entered details of a field and
returns a dict.'

def __get_field(self, index, **kwd):

    params = util.Params(kwd)
    label = util.restore_text(params.get(('field_label_%i' % index), ''))
    name = util.restore_text(params.get(('field_name_%i' % index), ''))
    helptext = util.restore_text(params.get(('field_helptext_%i' % index), ''))
    required = params.get(('field_required_%i' % index), False)
    field_type = util.restore_text(params.get(('field_type_%i' % index), ''))
    layout = params.get(('field_layout_%i' % index), '0')
    default = util.restore_text(params.get(('field_default_%i' % index), ''))
    if (not name.strip()):
        name = ('%i_field_name' % index)
    if (field_type == 'SelectField'):
        options = self.__get_select_field_options(index, **kwd)
        return {'name': name, 'label': label, 'helptext': helptext, 'visible': True, 'required': required, 'type': field_type, 'selectlist': options, 'layout': layout, 'default': default}
    return {'name': name, 'label': label, 'helptext': helptext, 'visible': True, 'required': required, 'type': field_type, 'layout': layout, 'default': default}
