• Resolved stijndn

    (@stijndn)


    Hi,

    For the internal website of my organisation, I love to work with the forms of pods. I would like to change the form a bit depending on the user who is logged in.

    I would like to change the ‘where’ of a relational field in a form with php. How do I do that?

    I see you can change some options for a specific field in a form.
    On the (information page about forms on pods.io I can find the following options you can change: type, label and default. What more options do you have to make changes? Could someone give examples of every option? So I know more what the possibilities there are. And especially how does it work to change the ‘where’.

    Here the example code I’m refering to on the information page:
    $params = array( ‘lightsaber_color’ => array( ‘default’ => ‘green’ ) , array( ‘sith_or_jedi’=> array( ‘default’ => ‘jedi’ ) ) );
    echo $mypod->form( $params );

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @stijndn

    Our forms so not support conditionals based on the current user.
    You should modify your PHP args for the form.

    The available options can be found in code, we don’t have a full codex of all options yet.
    https://github.com/pods-framework/pods/tree/main/classes/fields
    Here you’ll see all available fields and their options if you go to the get_options() method of a field.

    Keep in mind that for such modifications some knowledge of OOP is required.

    Cheers, Jory

Viewing 1 replies (of 1 total)
  • The topic ‘changing ‘where’ for a form’ is closed to new replies.