The problem is that we show a bad radio button in the Default Values fieldset. We are sending bad data to druapl_render() here, because initially no allowed values have been defined for the radio buttons. The error is:

notice: Array to string conversion in /Users/mw/htd/pr/includes/bootstrap.inc on line 706.

Not sure how best to fix, so I leave it to others.

Comments

francewhoa’s picture

The following solution worked for me.

Into the help text in the 5.x-1.6 release:

For a 'Single on/off checkbox' widget, define the 'off' value first, then the 'on' value in the Allowed values section. Note that the checkbox will be labeled with the label of the 'on' value.

So here's what you would do:

1) Add a Single on/off checkbox integer field.

2) Don't worry about changing the "Label" field since this does not does not have anything to do with what is displayed as the label.

3) Enter the following two values in the Allowed values list:
0|Do not display
1|Display

Now when you go to create content page for you content type you should have a checkbox with a "Display" label.

It works but it's not user friendly. It needs to be simplify.

Thanks to jsenich for this solution.

karens’s picture

Component: content.module » optionwidgets.module

Moving this, I'm trying to get all the issues related to optionwidgets in one place.

karens’s picture

Status: Active » Fixed

I don't think you'll see any errors in the latest code. I also made some changes to the documentation to make it easier to tell what to do. I had this in the code already, but it got broken somewhere along the line (I think when the 'allowed values' fieldset was collapsed).

Now if you choose number or text + optionwidgets, the 'Allowed values' fieldset is displayed uncollapsed and some additional description text is added to make it more clear what you should do.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.