Return the html ID for the given field_name.
490572
def html_id(self, field_name, form=None):
        """"""

        if form is None:
            form = self

        return form.auto_id % (form.add_prefix(field_name),)
40670
def get_custom_field(self, field_name):
        
        content_type = ContentType.objects.get_for_model(self)
        return CustomField.objects.get(
            content_type=content_type, name=field_name)
787173
def _get_id(self):
        """"""
        ret = None
        row = self.row
        if row:
            ret = row["id"]
        return ret
26922
def _ids(self):
        """"""
        for pk in self._pks:
            yield getattr(self, pk)

        for pk in self._pks:

            try:
                yield str(getattr(self, pk))
            except ValueError:
                pass
784225
def tag_id(self, name):
        
        return self._store.get(self.tag_key(name)) or self.reset_tag(name)
1323710
def get_id(self):
        
        if self.type == 'NAF':
            return self.node.get('id')
        elif self.type == 'KAF':
            return self.node.get('mid')
362725
def get_field(self, page, language, initial=None):
        """"""
        if self.parsed:
            help_text = _('Note: This field is evaluated as template code.')
        else:
            help_text = ''
        widget = self.get_widget(page, language)
        return self.field(
            widget=widget, initial=initial,
            help_text=help_text, required=False)
356683
def get_custom_value(self, field_name):
        
        custom_field = self.get_custom_field(field_name)
        return CustomFieldValue.objects.get_or_create(
            field=custom_field, object_id=self.id)[0].value
1068429
def field(ast, field_name)
      if field_name.nil? || field_name.to_s.empty?
        raise ArgumentError, "Field name cannot be nil or empty"
      end
      ast.xpath("(.//command[ident/@value='#{field_name}']|.//fcall[ident/@value='#{field_name}']/..)")
    end
854565
protected function elementId(string $var_name = ''): string
    {
        if ($this->action) {
            return $this->s::restActionFormElementId($this->action, $var_name);
        } elseif ($this->cfg->Widget) {
            return $this->cfg->Widget->get_field_id($var_name);
        }
        return $this->cfg->slug.($var_name ? '-'.$this->c::nameToSlug($var_name) : '');
    }
1113911
public function getFieldById($id, $field_name)
    {
        $data = $this->getDataById($id);
        if (null !== $data) {
            $field_name = (string)$field_name;
            if (array_key_exists($field_name, $data)) {
                return $data[$field_name];
            }
        }
        return null;
    }
1289754
public function getErrorByFieldName(string $field_name) : string
    {
        if (false === $this->validated) $this->validate();
        foreach ($this->validation_errors as $error) {
            if ($error->getFieldName() == $field_name) {
                return $error->getErrorMessage();
            }
        }
        return '';
    }
1300430
def get(self, id):
        """"""
        params = {'q': 'id:%s' % str(id), 'wt': 'python'}
        request = urllib.parse.urlencode(params, doseq=True)
        data = None
        try:
            rsp = self.doPost(self.solrBase + '', request, self.formheaders)
            data = eval(rsp.read())
        except Exception:
            pass
        if data['response']['numFound'] > 0:
            return data['response']['docs'][0]
        return None
198183
def get_id_by_name(api, search_name):
    
    entities = api.get_all(q='name==' + "'" + search_name + "'").content
    if entities:
        return entities[0].id
    return
1222438
def get_field_model(name, model=None):
    
    if '.' in name:
        m, name = name.split('.')
        model = get_model(m)

    if model:
        return getattr(model, name, None), model
    else:
        return None, None
1163836
def get_field_by_name(self, name):
        '''
        
        '''
        if name in self._fields_dict:
            return self._fields_dict[name]
        raise KittyException('field named (%s) was not found in (%s)' % (self, name))
629890
def lookupFieldTypeByName( fieldName )
      type = ""
      fid = lookupFieldIDByName( fieldName )
      field = lookupField( fid ) if fid
      type = field.attributes[ "field_type" ] if field
      type
   end