سؤال

I just started to work with Drupal modules. I have seen in some codes that some elements and properties (if I called them correctly, # for property) are assign to the $form. I have been googling but I couldn't find any useful document that shows this variable (again if I called it correctly) what kind of properties and elements has and in which tables it store? and how can I debug them ?

i.e. $account_form=&$form;
     $account_form['name']['#suffix']

I have check profile.module but it didn't help me! TNX

هل كانت مفيدة؟

المحلول

If you have a php debuger in your editor you can use it to find out what variables you have. On the other hand you can use print_r($form); and that will show you the array(hint in browser user CTRL+U to see the source, you'll find that in the source the form array looks nicer), or you can use var_dump().

If you want to create the form, and you want to know what options do you have, there is the Drupal Form Api( https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/7 ).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top