ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Switch display value of 0 and 1

relliott 20 Sep, 2017
Hello,

I have a simple database for storing statuses of a lead. In the database I have a fieldset of "active". The data is stored 0 for no and 1 for yes. How do I switch the datashown on my connection from 0 and 1's to No and Yes?

Thanks,

Ryan
Max_admin 29 Sep, 2017
1 Likes
Hi Ryan,

This is in a table view ? if yes then you will need a "Switch" function called in the "Columns views".

Example:
Model.field:{fn:myswitch}

Then in the "myswitch" function, set the "Data provider" to:
{var:table_view_name.row.Model.field}
Values setup:
0:No
1:Yes

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com