TOPIC:

Content Prepare for group radio button? 6 months 1 week ago #255494

  • Topic Author
  • skipt
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
I have a radio group with YES/NO. In Content View I get a 1 or a 0.

Can I use content prepare to change the 1 to "Yes" and the 0 to "No"?

A code snippet would be great.
Or do I have to code it in the Content Template using an if statement?

Please Log in or Create an account to join the conversation.

Last edit: Post by skipt.

Content Prepare for group radio button? 6 months 1 week ago #255499

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6888
  • Karma: 3
  • Thanks: 492
Hi,

this can be done in Item wrap code of this radio group with this:
<?php if($value=='1') {
$value='Yes';
}
if($value=='0') {
$value='No';
}
?>
Let me know if this is ok for you

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic. Reason: forgot to close

Content Prepare for group radio button? 6 months 1 week ago #255502

  • Topic Author
  • skipt
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
Gave this a try. loaded the view and did a Ctrl+F5 but it is still showing 1 or 0.

Please Log in or Create an account to join the conversation.

Last edit: Post by skipt.

Content Prepare for group radio button? 6 months 1 week ago #255503

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6888
  • Karma: 3
  • Thanks: 492
Hi,

how did you define this radio button group?

Instead of :
0;Yes;1
0;No;0

define it like:
0;Yes;Yes
0;No;No

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Content Prepare for group radio button? 6 months 1 week ago #255504

  • Topic Author
  • skipt
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
that didn't change anything.

Please Log in or Create an account to join the conversation.

Content Prepare for group radio button? 6 months 1 week ago #255505

  • Topic Author
  • skipt
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 16
  • Thanks: 0
the attachment has the current settings for the Data Storage, list view and content template
Attachments:

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.049 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!