DescribeSubforms
This method is used to supply a list of available subforms within the ARK instance. It will return a JSON array of all the different subforms within ARK and their relative ids and shortnames. This can be used in conjunction with transcludeSubforms() to retrieve rendered HTML of parts of the ARK instance.
Please note this method respects any security conditions set in the subform configuration - therefore if fields are, for instance, being restricted on userids or security groups they will not be made available for return by the API.
Path
http://your.ark.instance/api.php?req=describeSubforms
Arguments
- item_key - this is in the form 'cxt_cd and refers to the module from which the subforms are requested. If this is set to 'all' information about all available subforms are returned.
If anonymous logins are not enabled a username and password will need to be supplied:
- handle - username
- passwd - password
The method returns a JSON array unless otherwise specified:
- format - 'json' by default, but sending 'html' prints a human-readable array to screen
Example
Example return (returned JSONified - displayed as an array here for ease of viewing):
Array ( [hut] => Array ( [hut_desc] => Array ( [view_state] => max [edit_state] => view [sf_title] => desc [sf_html_id] => hut_desc [script] => php/subforms/sf_txt.php [sf_nav_type] => full [op_label] => space [op_input] => save [fields] => Array ( [0] => Array ( [field_id] => conf_field_description [dataclass] => txt [classtype] => notes [aliasinfo] => [editable] => 1 [hidden] => [add_validation] => Array ( [0] => Array ( [rq_func] => reqManual [vd_func] => chkSet [var_name] => cre_on [force_var] => NOW() ) [1] => Array ( [rq_func] => reqManual [vd_func] => chkSet [var_name] => log [force_var] => on ) [2] => Array ( [rq_func] => reqMulti [vd_func] => chkSet [var_name] => ste_cd [lv_name] => ste_cd [var_locn] => session ) [3] => Array ( [rq_func] => reqMulti [vd_func] => chkSet [var_name] => cre_by [lv_name] => user_id [var_locn] => live ) [4] => Array ( [rq_func] => reqClassType [vd_func] => chkSet [var_name] => txttype [lv_name] => classtype [var_locn] => field ) [5] => Array ( [rq_func] => reqMulti [vd_func] => chkSkipBlank [var_name] => txt [lv_name] => dyn_field [var_locn] => request ) [6] => Array ( [rq_func] => reqMulti [vd_func] => chkSet [var_name] => itemkey [lv_name] => item_key [var_locn] => live ) [7] => Array ( [rq_func] => reqItemVal [vd_func] => chkSet [var_name] => itemval [lv_name] => itemval [var_locn] => request [req_keytype] => auto [ret_keytype] => cd ) [8] => Array ( [rq_func] => reqMulti [vd_func] => chkSet [var_name] => lang [lv_name] => lang [var_locn] => live ) ) [edt_validation] => Array ( [0] => Array ( [rq_func] => reqManual [vd_func] => chkSet [var_name] => cre_on [force_var] => NOW() ) [1] => Array ( [rq_func] => reqManual [vd_func] => chkSet [var_name] => log [force_var] => on ) [2] => Array ( [rq_func] => reqMulti [vd_func] => chkSet [var_name] => ste_cd [lv_name] => ste_cd [var_locn] => session ) [3] => Array ( [rq_func] => reqMulti [vd_func] => chkSet [var_name] => cre_by [lv_name] => user_id [var_locn] => live ) [4] => Array ( [rq_func] => reqClassType [vd_func] => chkSet [var_name] => txttype [lv_name] => classtype [var_locn] => field ) [5] => Array ( [rq_func] => reqMulti [vd_func] => chkSkipBlank [var_name] => txt [lv_name] => dyn_field [var_locn] => request ) [6] => Array ( [rq_func] => reqMulti [vd_func] => chkSet [var_name] => itemkey [lv_name] => item_key [var_locn] => live ) [7] => Array ( [rq_func] => reqItemVal [vd_func] => chkSet [var_name] => itemval [lv_name] => itemval [var_locn] => request [req_keytype] => auto [ret_keytype] => cd ) [8] => Array ( [rq_func] => reqFragId [vd_func] => chkSet [var_name] => frag_id [lv_name] => id [var_locn] => request ) [9] => Array ( [rq_func] => reqMulti [vd_func] => chkSet [var_name] => lang [lv_name] => lang [var_locn] => live ) ) ) ) [frame] => ) ) )