splitbrain / dokuwiki-plugin-bureaucracy

Create forms and generate pages or emails from them
http://www.dokuwiki.org/plugin:bureaucracy
GNU General Public License v2.0
43 stars 46 forks source link

can not access field data #302

Closed taich001 closed 3 years ago

taich001 commented 3 years ago

I installed the example script to get form data into a php script. There is a fields array with all data in it, but I can not access the value of a specific filed.

I can write the whole array into a text file, like fwrite($file, var_export($fields[1], TRUE));

helper_plugin_bureaucracy_fieldtextbox::__set_state(array(
   'mandatory_args' => 2,
   'opt' =>
  array (
    'cmd' => 'textbox',
    'label' => 'Kunde',
    'display' => 'Kunde',
    'value' => 'Der Kunde',
  ),
   'tpl' =>
  array (
    '_elem' => 'textfield',
    '_text' => '@@DISPLAY@@',
    '_class' => '@@CLASS@@',
    'id' => '@@ID@@',
    'name' => '@@NAME@@',
    'value' => '@@VALUE@@',
    'class' => 'edit required',
    'required' => 'required',
  ),

I tried fields[1][opt], fields[1]['opt']['value'] fields[1]opt->['value'] I don't get it.

Please help!

splitbrain commented 3 years ago

I am not sure what you are trying to do from the code you posted. But this is not the place to learn/teach PHP.

taich001 commented 3 years ago

I just wanted to access the value of a textfield from a submit script, but since I am too stupid, this plugin is useless for me. Thanks for yout help.