Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#11523 closed defect (fixed)

Can not hide radio buttons

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: DynamicFieldsPlugin
Severity: normal Keywords:
Cc: weirdo Trac Release:

Description (last modified by Ryan J Ollos)

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 Ryan J Ollos 7 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by weirdo

Cc: weirdo added; anonymous removed

comment:2 Changed 7 years ago by Ryan J Ollos

Description: modified (diff)

Changed 7 years ago by Ryan J Ollos

Attachment: t11523.patch added

comment:3 Changed 7 years ago by Ryan J Ollos

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 7 years ago by Ryan J Ollos (previous) (diff)

comment:4 Changed 7 years ago by Ryan J Ollos

Owner: changed from Rob Guttman to Ryan J Ollos
Status: newaccepted

comment:5 Changed 7 years ago by Ryan J Ollos

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 7 years ago by Ryan J Ollos

In 13650:

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

comment:7 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.