"Conditional" Binary Field?

swd 11 Jul, 2013
Hi there,

I have a database table column with three values:

- ()
0 (no)
1 (yes)

The purpose of these values is to determine if someone who entred a cycle registration has to pay a late registration fee (value=0). Once he has paid, the race admin logs on, switches the binary field to 1 (paid) and the entry get's added to the race starting list.

However, there are people who registred early and don't have to pay that late registration fee. For them, the column receives a "-" (as in "not applicable") as value. (If it makes more sense I could also set the value to empty)

Is there a way to tell chronoforms to make only rows with 0 or 1 as value into a binary field?
Currently rows with "-" also get a binary field value (0) in the overview. This is confusing for the race admin.

I'm currently solving the problem with serving two tables (one with all the late registrations and another one with the rest), but I'd prefer if I could serve everything in one table.
Maybe I'm missing just something simple here, so I thought I'd ask: Any ideas how to go about that?

cheers
Michael
GreyHead 11 Jul, 2013
Hi SWD,

Binary fields are 0 or 1 (nothing else) so your column isn't strictly binary. And I guess that CC check the value by assuming that anything other than '1' is '0'. You could possibly handle it with some custom code.

Bob
Max_admin 14 Jul, 2013
Hello,

You can build your own images, links and switches using custom code and form events, it should work but will take time and is a bit complicated.

However, CCV5 has extra support for scenarios like this, V4 no, so you may contact me through the "contact us" page to get the latest version, but please note that it has a completely different interface and has no full Chronoforms support yet.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.