• Resolved johnaq

    (@johnaq)


    Is there a reference of what options are available to customise field display when using form()?

    I have found:
    – label
    – help
    – type (including hidden)

    What am I specifically looking for is READONLY.

    Thanks in advance

    https://ww.wp.xz.cn/plugins/pods/

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

    (@jimtrue)

    My apologies for the lateness in this reply, but I wanted to make sure I could test it. I’ll be adding these to the form() documentation as well.

    Yes, you can, you need to pass an array of ‘attributes’ at the field level, for readyonly, you’d do something like:

    $fields[ 'locked_name' ] = array( 'attributes' => array( 'readonly' => 'readonly' ));
    $pods->form($fields);

    You can use this method to add other HTML5 attributes which aren’t part of the standard, like placeholder, etc.

    Let me know if this answers your question,
    Thanks!

    Thread Starter johnaq

    (@johnaq)

    that’s the one, thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Form field display options using form()’ is closed to new replies.