« Back to Product

Documentation

IPS_GetConfigurationForm

Require: Symcon >= 2.7

 string IPS_GetConfigurationForm (int $InstanceID) 

Parameters

InstanceID

ID of the instance

Returns

If the function is executed successfully, it returns the configuration form of the instance as a JSON-encoded string.

Description

Returns the configuration form of the instance with the ID InstanceID as a JSON-encoded string.

Example

// Read the configuration form of instance 12345 and output its elements
$configpage = json_decode(IPS_GetConfigurationForm(12345));
var_dump ($configpage->elements);

/* Example output:
array(2) {
    [0]=>
        object(stdClass)#2 (2) {
            ["type"]=>
            string(5) "Label"
            ["label"]=>
            string(28) "Minimum needed daily changes"
        }
    [1]=>
        object(stdClass)#3 (3) {
            ["type"]=>
            string(13) "NumberSpinner"
            ["name"]=>
            string(19) "RequiredSwitchCount"
            ["caption"]=>
            string(5) "Count"
        }
}
*/
Any questions?