Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#11523 closed defect (fixed)

Can not hide radio buttons

Reported by: anonymous Owned by: rjollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: weirdo 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 3 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 3 years ago by weirdo

  • Cc weirdo added; anonymous removed

comment:2 Changed 3 years ago by rjollos

  • Description modified (diff)

Changed 3 years ago by rjollos

comment:3 Changed 3 years 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 3 years ago by rjollos (previous) (diff)

comment:4 Changed 3 years ago by rjollos

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

comment:5 Changed 3 years 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 3 years ago by rjollos

In 13650:

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

comment:7 Changed 3 years 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 owner will remain rjollos.
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.