Hi,
I know there is a lot of posts about this but mostly "how to change radio buttons to dropdown list". I need the other way around - I have dropdown list and need radio buttons. Changing "is a list" or "hidden" to "NO" makes no difference. I also tried PRO's VMCustom - dropbox plugin.
Can anyone help me with this?
Thanks,
VM 2.0.18a
Joomla 2.5.9
I am also looking for this.
Please let me know if you find out how to do this.
Ditto also. I cannot find either. Anyone know? Thanks.
administrator/components/com_cvirtuemart/helpers/html.php
if you look in MY plugin
You will see it uses
$html = JHTML::_('select.genericlist', $selects,'customPlugin['.$field->virtuemart_customfield_id.']['.$this->_name.'][custom_drop]','','value','text',$selects[0],false,true);
You could also use vmHtml
& use the radioList function
ofcourse, you will have to do a little coding
Hi PRO, I went and installed your plugin but there is no Use plugin in my custom fields when creating a new one. I have enabled the Plugin in Joomlas plugin manager already but it doesnt show the option to use your plugin when in customfields.
I was also wondering if it is possible to do tick boxes with this also? I want users to be able to select different or all options if they need.
Thanks.
Quote from: Ninjab on May 02, 2013, 10:45:55 AM
Hi PRO, I went and installed your plugin but there is no Use plugin in my custom fields when creating a new one. I have enabled the Plugin in Joomlas plugin manager already but it doesnt show the option to use your plugin when in customfields.
I was also wondering if it is possible to do tick boxes with this also? I want users to be able to select different or all options if they need.
Thanks.
when you click save after choosing plugin,
you dont see it in the dropdown?
Quote from: PRO on May 02, 2013, 19:27:04 PM
Quote from: Ninjab on May 02, 2013, 10:45:55 AM
Hi PRO, I went and installed your plugin but there is no Use plugin in my custom fields when creating a new one. I have enabled the Plugin in Joomlas plugin manager already but it doesnt show the option to use your plugin when in customfields.
I was also wondering if it is possible to do tick boxes with this also? I want users to be able to select different or all options if they need.
Thanks.
when you click save after choosing plugin,
you dont see it in the dropdown?
Hi Pro, yes I got the plugin working. Reason I didnt see it as I was trying to edit other fields.
However, how does this plugin give me a radio list instead of a dropdown list?
NO, but did you see my post above about how to modify it?
Quote from: PRO on May 01, 2013, 19:56:09 PM
administrator/components/com_cvirtuemart/helpers/html.php
if you look in MY plugin
You will see it uses
$html = JHTML::_('select.genericlist', $selects,'customPlugin['.$field->virtuemart_customfield_id.']['.$this->_name.'][custom_drop]','','value','text',$selects[0],false,true);
You could also use vmHtml
& use the radioList function
ofcourse, you will have to do a little coding
Yes I see this now. Sorry I missed it. However how do I do it? And what if I dont want all my lists to be radio buttons? Some I will need in radio and some as tickboxes and some as dropdowns.
Thanks PRO.
Quote from: Ninjab on May 03, 2013, 12:45:22 PM
Yes I see this now. Sorry I missed it. However how do I do it? And what if I dont want all my lists to be radio buttons? Some I will need in radio and some as tickboxes and some as dropdowns.
Thanks PRO.
sounds like you are going to have to get someone to code something for you.
Or look around for other plugins,
My plugin can be modified by someone who knows how to code, & has the time to do it.
See image below, with what I got
by just changing this
$html = JHTML::_('select.genericlist', $selects,'customPlugin['.$field->virtuemart_customfield_id.']['.$this->_name.'][custom_drop]','','value','text',$selects[0],false,true);
to this
$html = JHTML::_('select.radiolist', $selects,'customPlugin['.$field->virtuemart_customfield_id.']['.$this->_name.'][custom_drop]','','value','text',$selects[0],false,true);
as you can see it's not complete, but just needs some tweeking
[attachment cleanup by admin]
Thanks. However I wouldnt know how to change your code to achieve what I need as my PHP coding skills is next to none.
Quote from: PRO on May 03, 2013, 20:08:52 PM
See image below, with what I got
by just changing this
$html = JHTML::_('select.genericlist', $selects,'customPlugin['.$field->virtuemart_customfield_id.']['.$this->_name.'][custom_drop]','','value','text',$selects[0],false,true);
to this
$html = JHTML::_('select.radiolist', $selects,'customPlugin['.$field->virtuemart_customfield_id.']['.$this->_name.'][custom_drop]','','value','text',$selects[0],false,true);
as you can see it's not complete, but just needs some tweeking
Hi PRO,
Thanks for this tip! After I've changed:
return JHTML::_('select.genericlist', $options,$name,$attrib,$key,$text,$default,false,true);
to:
return JHTML::_('select.radiolist', $options,$name,$attrib,$key,$text,$default,false,true);
in the administrator/components/com_virtuemart/helpers/html.php, I've got what I wanted (see picture)! Making this a list in the column would be even better but still..
BTW I'm using a native Virtuemart Custom Fields function.
Many thanks for this.
[attachment cleanup by admin]
Huge thanks to syntalk and everybody !
I made same change as syntalk described on a standard Custom Field and got radiobuttons!
[attachment cleanup by admin]
By the way, if you like to avoid hacks, check also this solution
http://breakdesigns.net/extensions/customfields-for-all
Quote from: balai on August 13, 2013, 09:27:16 AM
By the way, if you like to avoid hacks, check also this solution
http://breakdesigns.net/extensions/customfields-for-all
Thanks a lot for this. This will come in VERY handy.
Their custom filter also will solve my sub-category issue.
Hi,
l haw Virtuemart 2.0.22c. The place where it is necessary to make changes: administrator/components/com_cvirtuemart/helpers/html.php
}
return JHTML::_('select.genericlist', $options,$name,$attrib,$key,$text,$default,false,true);
}
I changed:
from select.genericlist to select.radiolist
Firefox understands this change, but do not understand the Opera, Google Chrome, Internet Explorer...
Maybe you know how to fix, that all browsers understand the changes?
that code is ran by virtuemart, not the browser
Does this change work even with generic child variant? And is there also fix for a new version of virtuemart ?