HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Custom DL Field: Choices for radio buttons all display if no button selected.

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#109215 (In Topic #21460)
TQ
Avatar

Honoured member

Hi All,

I have created a Custom Downloads Field type: 'A value chosen from a set of radio button' with 3 buttons.

If one of the buttons is selected all is well but if no button is selected ALL of the options I have created are displayed.









I assumed that the radio button result would not show (like other fields) if NONE were selected, have I got this wrong. If I'm in error, is there another way to do what I'm trying to achieve.

Thanks

TQ
PS: I have hidden this field until I find a solution
Back to the top
 
Posted
Rating:
#109221
Avatar

Hi,

Is it definitely the case that you're adding with it unselected, then seeing all the options show? Because I can't reproduce this.

Could it instead be you added the download, then added the field, and now you're comparing the edit form for that pre-existing download to the view screen of the download?

I believe when a new field is added retroactively we copy in the "default" for that field to all existing entries.

That said, we should be smarter than this anyway.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#109229
TQ
Avatar

Honoured member

Chris Graham said

Could it instead be you added the download, then added the field, and now you're comparing the edit form for that pre-existing download to the view screen of the download?
Hi Chris,

You are absolutely right, I was referring to existing entries after adding the new field to the system. I do my best to provide all the pertinent information but after about 14 hours working on the site yesterday, my aged brain just wasn't being cooperative :)

The situation is not ideal as my site is constantly evolving as I better understand what I want and what users need.

I am still rubbish at finding my way around your database but finally found what I was looking for and took the risk (after backing up) of emptying the appropriate field like:

Code

UPDATE ocp_catalogue_efv_long
SET cv_value = ''
WHERE cf_id = 67 AND cv_value = 'A - Real type & Images, searchable|B - Scanned pages, very readable but not searchable|C - Scanned pages, generally readable, not searchable'
which did the trick. (Now I can go back to better describing what the radio buttons represent.)

Thanks for your reply and pointing me in the right direction.

TQ
Back to the top
 
Posted
Rating:
#109231
Avatar

Yep, good job - that's what I'd have recommended.

For the record I tweaked our field adding code last night so this won't be an issue going forward.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#109234
TQ
Avatar

Honoured member

Thanks Chris,

Another 'Case Closed' in less that 24 hours, excellent support as always!

TQ
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: