Last active
October 26, 2017 03:44
-
-
Save rahularyan/a0a910a87995c73dc2f065492a8d5545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// AnsPress group field. | |
array( | |
... | |
'type' => 'group', | |
'toggleable' => true, // Checkbox for showing and hiding group. | |
'fields' => array( | |
'child-1' => array( | |
'label' => __( 'A simple child text field' ), | |
'type' => 'input', | |
), | |
'child-2' => array( | |
'label' => __( 'A simple child textarea field' ), | |
'type' => 'textarea', | |
), | |
'child-3' => array( | |
'label' => __( 'A simple child upload field' ), | |
'type' => 'upload', | |
), | |
// A group field can have group field as child. | |
'child-group' => array( | |
'label' => __( 'Group of field' ), | |
'type' => 'group', | |
'fields' => array( | |
'child-of-child-1' => array( | |
'label' => __( 'A simple child email field' ), | |
'type' => 'input', | |
'subtype' => 'email', | |
), | |
'child-of-child-2' => array( | |
'label' => __( 'A simple child password field' ), | |
'type' => 'input', | |
'subtype' => 'password', | |
), | |
), | |
), | |
), | |
... | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment