Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author miunosoft

    (@miunosoft)

    No, at the moment. Sorry.

    Edit:
    Ah wait, maybe you can use the number field type. Set number to the type argument in the field definition array instead of text.

    Thread Starter David Gewirtz

    (@dgewirtz)

    Seems like an approach. So I have ‘type’ => ‘text’ but I’m using two fields together. Would I do something like `

    array(
    ‘type’ => ‘text’,
    ‘type’ => ‘number’,
    )`

    Or some other way to define the two fields?

    Thanks,
    David

    Plugin Author miunosoft

    (@miunosoft)

    To mix different field types in a field set, you can do something like this.

    array(
        'field_id'          => 'mixed',
        'title'             => __( 'Mixed', 'admin-page-framework-test' ),
        'type'              => 'text',
        array(
            'type'  => 'number',
        ),
    ),

    However, it cannot be used with the sortable and repeatable fields. You may use a section to repeat those.

    Plugin Author miunosoft

    (@miunosoft)

    Closing the topic due to inactivity.

    Plugin Author miunosoft

    (@miunosoft)

    As of v3.8, the inline_mixed field type is supported and it can have multiple field types in one field. Examples is in the demo page accessed via Dashboard -> APF Demo -> Advanced Usage -> Mixed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Easy way to validate a field entered is an integer?’ is closed to new replies.