web/formfields.py
branchstable
changeset 8517 199fefe396ab
parent 8458 1c5f3c66ec53
child 8665 e65af61bde7d
equal deleted inserted replaced
8516:75fe6dca79b4 8517:199fefe396ab
   311             form.formvalues[(self, 'input_name', suffix)] = name
   311             form.formvalues[(self, 'input_name', suffix)] = name
   312             return name
   312             return name
   313 
   313 
   314     def role_name(self):
   314     def role_name(self):
   315         """return <field.name>-<field.role> if role is specified, else field.name"""
   315         """return <field.name>-<field.role> if role is specified, else field.name"""
       
   316         assert self.name, 'field without a name (give it to constructor for explicitly built fields)'
   316         if self.role is not None:
   317         if self.role is not None:
   317             return role_name(self.name, self.role)
   318             return role_name(self.name, self.role)
   318         return self.name
   319         return self.name
   319 
   320 
   320     def dom_id(self, form, suffix=None):
   321     def dom_id(self, form, suffix=None):