• I am trying to test the value of a multi-select checkbox field in a PDB list template. I use code like this:

    <?php if ( ($record->has_content( ‘days_attending’ ) ) and ( $record->get_value(‘days_attending’) != “None”)): ?>

    but it seems that the get_value for this field is not returning any data. The field name in the Manage Database Fields panel is “Days Attending”.
    What am I doing incorrectly?

Viewing 1 replies (of 1 total)
  • Plugin Author xnau webdesign

    (@xnau)

    In a situation like this, it can be helpful to see exactly what value you are getting, this will help explain the best way to test for the value.

    If you’re got your php error log set up, you can do something like:

    <?php
    error_log('days_attending value: ' . $record->get_value(‘days_attending’) );
    ?>

    Also, you should use && instead of and in your test.

Viewing 1 replies (of 1 total)

The topic ‘get_value in PDB List Template’ is closed to new replies.