Forum Replies Created
If you need further help with this, please open a support ticket and I will definitely help you sort this out :)
RE: is it possible to add multiple radio button groups at the same time? so they show up in the same box in the admin manage page?
I think I answered this in the other support thred, here:
RE: on the public side it just displays the KEY of the radio button (i.e. not_supported) as opposed the NAME “Not Supported” … What do I need to do to change the card.php and card-single.php files to show the NAME of the button instead?
What you are seeing is correct as the
keyis the value saved in the database. Dealing with radios, dropdowns, and checkboxes are more challenging when compared to the text fields.
I deal with these by creating helper functions. It is probably easier to explain with an example. So let use the free Education Levels addon.
If you look at this line of code you’ll see I called a helper function to add the options instead of adding them directly to the fields array:
Here’s the link to that helper function:
As you see, it simply returns the array that you would have added to the fields array when registering the field.
To get the name of the option, in the template, get the key as you already did and created another helper function to get the name.
Here’s a link that that helper function use in the addon:
The add-on uses a Content Block to display the output in a template, so there is not a specific example I can give you. But, you only really need to register the field and use the two helper functions to get it to display in the template.
If you open a support ticket and attached your code, zipped, I can use your code and create a working example that you can build from.
RE: what about CVS Import / Export? do I just use the code as found on the Customize Text Field page but change the field_id info to match my radio buttons?
You could, but in the CSV file, you would get the key saved in the database and not the name. Depending on your use, that might be desired. If you want to import to and from by the name and not the key. That is trickier because you need to transform the key and name during import/export. Here’s I do it in the Education add-on:
You’ll notice that I use the same helper function that was used when registering the field.
I hope this helps!08/11/2020 at 9:53 am in reply to: How to add multiple custom fields to the admin “manage” page? #527648
Add all fields to the same meta box instead of separate meta boxes. Do this by adding all the fields to the
fieldskey in the array.
Here’s a link to a complex example. The highlighted section show two radio groups registered to a single meta box:
I hope this helps!08/11/2020 at 9:36 am in reply to: Is it possible to add an additional “Content Tray” to the cMap template? #527646
There already is a second content tray. Please use the Notes field. When content is added to the Note field, it will display as a second content tray next to the bio content tray.
I hope this helps!
ps. Please use the helpdesk support tickets as the support forum is closed and not actively monitored.
Sorry, is not possible to add an icon. You have to choose from one of the available icons.
Great to hear you figured it out!
fyi, its best, going forward that you open support tickets instead of posting to the support forum.
RE: how will this work if we have multiple categories for the same person? Should we include Name, Slug, Parent, Description multiple times, or can we put them in the same csv field, separated by commas?
Here’s the link to a FAQ which gives instruction on how to import categories with an entry:
I hope this helps!
I am sorry, but I do not know what a DMS editor is. Could you please provide more detail?
Also, if you could open a support ticket instead, that would be great. Thanks! here’s the link:
Just enough to see the page. That’s all.