Hi,
I need radios instead of checkboxes in OG Audience when user creates content and assign it to groups.
I dont want allow multiply group publishing. One blog entry only to one group.
I've changed:
$type = $cnt >= 20 ? 'select' : 'checkboxes';
$type = $cnt >= 20 ? 'select' : 'radios';
in og.module
Now I have radios in OG Audience form, but when submit I get such errors:
warning: implode(): Bad arguments. in z:\home\test2.ru\www\modules\og\og.module on line 1696.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ( (oug.og_email IS NULL AND ou.mail_type=1) query: SELECT DISTINCT(u.mail) as mail, ou.nid AS gid, n.title AS group_name, n.uid AS group_uid, u.name AS group_owner, oug.og_email FROM og_uid ou INNER JOIN users u ON ou.uid=u.uid LEFT JOIN og_uid_global oug ON ou.uid=oug.uid INNER JOIN node n ON ou.nid=n.nid WHERE u.mail != '' AND ou.nid IN () AND ( (oug.og_email IS NULL AND ou.mail_type=1) OR (oug.og_email = 2 AND ou.mail_type=1) OR (oug.og_email = 1) ) in z:\home\test2.ru\www\includes\database.mysql.inc on line 172.
and content isn't issignet to a group.
Any suggestions?
Comments
checkbox vs radio
Checkboxes and radio input types are handled differently when parsing the submitted form.
Checkboxes have different names assigned to each other, producing many element with different corresponding values to be parsed on submission, while radio buttons share a common name attribute (that makes it unique and not conflict with another set of radio buttons), producing a single element with a chosen value to be parsed upon submission. The solution your are looking for is a little bit more complicated than replacing "checkbox" with "radio". The way the code names the checkboxes will have to be altered to have the options share a common name. In addition to this, the checkboxes (by default) look like they contain specific information for the submission page (rather than just and increment of checkbox1, checkbox2, checkbox3) which leads me to believe that the name of the checkbox plays a bigger role than just a way to parse values through a For loop.
This would be a useful
This would be a useful feature, not least to limit publishing to one group only. Any progress on this issue?
Subscribe - This would be
Subscribe - This would be very useful. My motivation is that this conflicts with the formfilter module that can't handle checkboxes. Would it be possible to replace the checkboxes with dropdown?
+subscribing
+subscribing