• Resolved ominem

    (@ominem)


    Hi, I tried to replicate the example on: https://docs.pods.io/code/pods/form/
    for my own pod like this:

    $mypod = pods( 'expert_woman' );
    $params = array( 'researcher_name', 'surname', 'researcher_email_contact', 'researcher_phone', 'researcher_photo', 'researcher_country', 'research_interests','career_stage', array( 'added_by'=> array( 'default' => '1' )  )  );
    echo $mypod->form( $params );
    

    but I’m getting an “Invalid configuration” message without error.
    Any idea what could be the problem?
    Thanks in advance

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

    (@keraweb)

    Hi @ominem

    This might be your last param, it doesn’t include a key.

    Cheers, Jory

    Thread Starter ominem

    (@ominem)

    yes, the problem was the array if remove the array and only write ‘added_by’ like the other atribbutes works fine:
    $params = array( 'researcher_name', 'surname', 'researcher_email_contact', 'researcher_phone', 'researcher_photo', 'researcher_country', 'research_interests','career_stage', 'added_by'=> array( 'default' => '1' ) );
    Thanks

    • This reply was modified 3 years, 1 month ago by ominem.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘default value on form() function’ is closed to new replies.