• Resolved jdinsmore

    (@jdinsmore)


    When using the “form” function is it possible (and if so how) to use a where clause on one of the fields?

    For example:
    $where_clause = “name <> ‘xyz'”;
    $fields = array (‘relationship_field_B’ =>array (‘where’ => ”.$where_clause.”));
    echo $mypod->form($fields);

    In this case ‘relationship_field_B’ would be a drop down in the form. The goal is to limit what options appear in the drop down based on some condition defined in the where clause.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    That sounds more like you’re trying to filter the relationship options; those are available under the Additional Options for the Relationship field itself, under Customized WHERE. That’s where that is handled.

    The issue you’ll have with any form is if you want the value to be limited by something that doesn’t exist yet in the post (ie, the response or value from another field on the input). We do not support that yet and won’t be able to until 2.8 and PodsObjects are a thing.

    Our form handling is pretty much the ‘back-end on the front-end’ so if you’re needing more complicated form handling, you might want to take a look at Gravity Forms and our Pods Gravity Forms Add-on.

Viewing 1 replies (of 1 total)
  • The topic ‘Pods Form – Field Options’ is closed to new replies.