@ 2014-10-10T14:54:50Z <?php
$form = array (
'#method' => 'POST',
'refsaving' =>
array (
'#type' => 'textfield',
'#title' => 'Ref.',
'#size' => 30,
'#maxlength' => 128,
'#required' => true,
'#attributes' =>
array (
'placeholder' => 'Reference #',
'required' => '',
),
'#input' => true,
'#autocomplete_path' => false,
'#process' =>
array (
0 => 'ajax_process_form',
),
'#theme' => 'textfield',
'#theme_wrappers' =>
array (
0 => 'form_element',
),
'#pre_render' =>
array (
0 => 'ctools_dependent_pre_render',
),
'#defaults_loaded' => true,
'#tree' => false,
'#parents' =>
array (
0 => 'refsaving',
),
'#array_parents' =>
array (
0 => 'refsaving',
),
'#weight' => 0,
'#processed' => true,
'#title_display' => 'before',
'#id' => 'edit-refsaving',
'#name' => 'refsaving',
'#value' => 'REF123',
'#needs_validation' => true,
'#ajax_processed' => false,
'#sorted' => true,
'#validated' => true,
),
'initamount' =>
array (
'#type' => 'textfield',
'#title' => 'Initial Amount',
'#size' => 10,
'#maxlength' => 12,
'#required' => true,
'#prefix' => '<div class="chf">',
'#suffix' => '</div>',
'#attributes' =>
array (
'placeholder' => 'Initial amount in CHF',
'required' => '',
'type' => 'numeric',
),
'#input' => true,
'#autocomplete_path' => false,
'#process' =>
array (
0 => 'ajax_process_form',
),
'#theme' => 'textfield',
'#theme_wrappers' =>
array (
0 => 'form_element',
),
'#pre_render' =>
array (
0 => 'ctools_dependent_pre_render',
),
'#defaults_loaded' => true,
'#tree' => false,
'#parents' =>
array (
0 => 'initamount',
),
'#array_parents' =>
array (
0 => 'initamount',
),
'#weight' => 0.001000000000000000020816681711721685132943093776702880859375,
'#processed' => true,
'#title_display' => 'before',
'#id' => 'edit-initamount',
'#name' => 'initamount',
'#value' => '100',
'#needs_validation' => true,
'#ajax_processed' => false,
'#sorted' => true,
'#validated' => true,
),
'netsaving' =>
array (
'#type' => 'textfield',
'#title' => 'Net Saving',
'#size' => 10,
'#maxlength' => 12,
'#required' => true,
'#prefix' => '<div class="chf">',
'#suffix' => '</div>',
'#attributes' =>
array (
'placeholder' => 'Net saving in CHF',
'required' => '',
'type' => 'numeric',
),
'#input' => true,
'#autocomplete_path' => false,
'#process' =>
array (
0 => 'ajax_process_form',
),
'#theme' => 'textfield',
'#theme_wrappers' =>
array (
0 => 'form_element',
),
'#pre_render' =>
array (
0 => 'ctools_dependent_pre_render',
),
'#defaults_loaded' => true,
'#tree' => false,
'#parents' =>
array (
0 => 'netsaving',
),
'#array_parents' =>
array (
0 => 'netsaving',
),
'#weight' => 0.00200000000000000004163336342344337026588618755340576171875,
'#processed' => true,
'#title_display' => 'before',
'#id' => 'edit-netsaving',
'#name' => 'netsaving',
'#value' => '20',
'#needs_validation' => true,
'#ajax_processed' => false,
'#sorted' => true,
'#validated' => true,
),
'supplier' =>
array (
'#type' => 'textfield',
'#title' => 'Supplier',
'#size' => 40,
'#maxlength' => 128,
'#required' => true,
'#attributes' =>
array (
'placeholder' => 'Name of the supplier',
),
'#input' => true,
'#autocomplete_path' => false,
'#process' =>
array (
0 => 'ajax_process_form',
),
'#theme' => 'textfield',
'#theme_wrappers' =>
array (
0 => 'form_element',
),
'#pre_render' =>
array (
0 => 'ctools_dependent_pre_render',
),
'#defaults_loaded' => true,
'#tree' => false,
'#parents' =>
array (
0 => 'supplier',
),
'#array_parents' =>
array (
0 => 'supplier',
),
'#weight' => 0.003000000000000000062450045135165055398829281330108642578125,
'#processed' => true,
'#title_display' => 'before',
'#id' => 'edit-supplier',
'#name' => 'supplier',
'#value' => 'Le supplier',
'#needs_validation' => true,
'#ajax_processed' => false,
'#sorted' => true,
'#validated' => true,
),
'comments' =>
array (
'#type' => 'textarea',
'#title' => 'Comments',
'#rows' => 3,
'#cols' => 86,
'#default_value' => '',
'#attributes' =>
array (
'placeholder' => 'Comments about the saving',
),
'#maxlength' => 256,
'#input' => true,
'#resizable' => true,
'#process' =>
array (
0 => 'ajax_process_form',
),
'#theme' => 'textarea',
'#theme_wrappers' =>
array (
0 => 'form_element',
),
'#pre_render' =>
array (
0 => 'ctools_dependent_pre_render',
),
'#defaults_loaded' => true,
'#tree' => false,
'#parents' =>
array (
0 => 'comments',
),
'#array_parents' =>
array (
0 => 'comments',
),
'#weight' => 0.0040000000000000000832667268468867405317723751068115234375,
'#processed' => true,
'#required' => false,
'#title_display' => 'before',
'#id' => 'edit-comments',
'#name' => 'comments',
'#value' => 'sgda',
'#needs_validation' => true,
'#ajax_processed' => false,
'#sorted' => true,
'#validated' => true,
),
'estimated' =>
array (
'#type' => 'radios',
'#title' => 'Estimated?',
'#default_value' => 'N',
'#options' =>
array (
'Y' => 'Yes',
'N' => 'No',
),
'#description' => 'Choose \'Yes\' if the amount introduced is an estimated amount.',
'#input' => true,
'#process' =>
array (
0 => 'form_process_radios',
),
'#theme_wrappers' =>
array (
0 => 'radios',
),
'#pre_render' =>
array (
0 => 'form_pre_render_conditional_form_element',
1 => 'ctools_dependent_pre_render',
),
'#defaults_loaded' => true,
'#tree' => false,
'#parents' =>
array (
0 => 'estimated',
),
'#array_parents' =>
array (
0 => 'estimated',
),
'#weight' => 0.005000000000000000104083408558608425664715468883514404296875,
'#processed' => true,
'#required' => false,
'#attributes' =>
array (
),
'#title_display' => 'before',
'#id' => 'edit-estimated',
'#name' => 'estimated',
'#value' => 'Y',
'#needs_validation' => true,
'Y' =>
array (
'#type' => 'radio',
'#title' => 'Yes',
'#return_value' => 'Y',
'#default_value' => 'N',
'#attributes' =>
array (
),
'#parents' =>
array (
0 => 'estimated',
),
'#id' => 'edit-estimated-y',
'#ajax' => NULL,
'#weight' => 0.001000000000000000020816681711721685132943093776702880859375,
'#input' => true,
'#process' =>
array (
0 => 'ajax_process_form',
),
'#theme' => 'radio',
'#theme_wrappers' =>
array (
0 => 'form_element',
),
'#title_display' => 'after',
'#pre_render' =>
array (
0 => 'ctools_dependent_pre_render',
),
'#defaults_loaded' => true,
'#tree' => false,
'#array_parents' =>
array (
0 => 'estimated',
1 => 'Y',
),
'#processed' => true,
'#required' => false,
'#name' => 'estimated',
'#value' => 'Y',
'#needs_validation' => true,
'#ajax_processed' => false,
'#sorted' => true,
'#validated' => true,
),
'N' =>
array (
'#type' => 'radio',
'#title' => 'No',
'#return_value' => 'N',
'#default_value' => 'N',
'#attributes' =>
array (
),
'#parents' =>
array (
0 => 'estimated',
),
'#id' => 'edit-estimated-n',
'#ajax' => NULL,
'#weight' => 0.00200000000000000004163336342344337026588618755340576171875,
'#input' => true,
'#process' =>
array (
0 => 'ajax_process_form',
),
'#theme' => 'radio',
'#theme_wrappers' =>
array (
0 => 'form_element',
),
'#title_display' => 'after',
'#pre_render' =>
array (
0 => 'ctools_dependent_pre_render',
),
'#defaults_loaded' => true,
'#tree' => false,
'#array_parents' =>
array (
0 => 'estimated',
1 => 'N',
),
'#processed' => true,
'#required' => false,
'#name' => 'estimated',
'#value' => 'Y',
'#needs_validation' => true,
'#ajax_processed' => false,
'#sorted' => true,
'#validated' => true,
),
'#validated' => true,
),
'created' =>
array (
'#type' => 'hidden',
'#value' => 'oscar',
'#input' => true,
'#process' =>
array (
0 => 'ajax_process_form',
),
'#theme' => 'hidden',
'#defaults_loaded' => true,
'#tree' => false,
'#parents' =>
array (
0 => 'created',
),
'#array_parents' =>
array (
0 => 'created',
),
'#weight' => 0.00600000000000000012490009027033011079765856266021728515625,
'#processed' => true,
'#required' => false,
'#attributes' =>
array (
),
'#title_display' => 'before',
'#id' => 'edit-created',
'#name' => 'created',
'#ajax_processed' => false,
'#sorted' => true,
'#validated' => true,
),
'actions' =>
array (
'#type' => 'actions',
'submit' =>
array (
'#type' => 'submit',
'#value' => 'Insert',
'#submit' =>
array (
0 => 'fp_savings_insert_saving_form_submit',
),
'#input' => true,
'#name' => 'op',
)));
$obj = (object) $form;
print_r(array_keys($form));
echo get_class_vars($obj);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 Array
(
[0] => #method
[1] => refsaving
[2] => initamount
[3] => netsaving
[4] => supplier
[5] => comments
[6] => estimated
[7] => created
[8] => actions
)
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/VMnVX:441
Stack trace:
#0 /in/VMnVX(441): get_class_vars(Object(stdClass))
#1 {main}
thrown in /in/VMnVX on line 441
Process exited with code 255 . Output for 5.0.3 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 , 5.3.0 - 5.3.29 , 5.4.0 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.40 , 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 Array
(
[0] => #method
[1] => refsaving
[2] => initamount
[3] => netsaving
[4] => supplier
[5] => comments
[6] => estimated
[7] => created
[8] => actions
)
Warning: get_class_vars() expects parameter 1 to be string, object given in /in/VMnVX on line 441
Output for 5.0.0 - 5.0.2 Array
(
[0] => #method
[1] => refsaving
[2] => initamount
[3] => netsaving
[4] => supplier
[5] => comments
[6] => estimated
[7] => created
[8] => actions
)
Notice: Object of class stdClass to string conversion in /in/VMnVX on line 441
Output for 4.3.0 - 4.3.11 , 4.4.0 - 4.4.9 Array
(
[0] => #method
[1] => refsaving
[2] => initamount
[3] => netsaving
[4] => supplier
[5] => comments
[6] => estimated
[7] => created
[8] => actions
)
Notice: Object to string conversion in /in/VMnVX on line 441
preferences:dark mode live preview
297.87 ms | 402 KiB | 459 Q