Opened 9 months ago

Closed 8 months ago

Last modified 8 months ago

#11523 closed defect (fixed)

Can not hide radio buttons

Reported by: anonymous Owned by: rjollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: peter@… Trac Release:

Description (last modified by rjollos)

If you have a custom field that is set as a radio

ittype = radio
ittype.label = IT Type
ittype.options = Help Desk|Project
ittype.order = 3
ittype.value = Help Desk

you can not hide it based on the group using

ittype.show_if_group = itmember

It works for text and standard just not for radio.

Attachments (1)

t11523.patch (949 bytes) - added by rjollos 9 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 months ago by weirdo

  • Cc peter@… added

comment:2 Changed 9 months ago by rjollos

  • Description modified (diff)

Changed 9 months ago by rjollos

comment:3 Changed 9 months ago by rjollos

The problem is with the markup for a radio button:

  <th class="col1">
  IT Type:
  <td class="col1">
      <input type="radio" name="field_ittype" value="" checked="checked">
      Help Desk
      <input type="radio" name="field_ittype" value="">
  • The inputs don't have id tags.
  • The content of the th isn't wrapped in a label.

The jQuery selectors are expecting both of those conditions to be in place. For example, here is the markup for a text field:

  <th class="col2">
    <label for="field-keywords">Keywords:</label>
  <td class="col2">
    <input type="text" id="field-keywords" name="field_keywords">

I've attached a patch against the 0.11 branch. Would you kindly test it out?: t11523.patch.

Last edited 8 months ago by rjollos (previous) (diff)

comment:4 Changed 9 months ago by rjollos

  • Owner changed from robguttman to rjollos
  • Status changed from new to accepted

comment:5 Changed 8 months ago by rjollos

In 13649:

Added support for hiding radio buttons. Refs #11523.

The radio buttons don't have an id attribute like the select and input elements, so the jQuery selector had to be modified.

comment:6 Changed 8 months ago by rjollos

In 13650:

Bump version to 1.2.4. Refs #11378, #11118, #11523, #10126, #9605, #9986, #9996, #8971.

comment:7 Changed 8 months ago by rjollos

  • Resolution set to fixed
  • Status changed from accepted to closed

Please report back if you are able to test the latest version.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.