<bdo id='NqdE9'></bdo><ul id='NqdE9'></ul>

    1. <tfoot id='NqdE9'></tfoot>
      <legend id='NqdE9'><style id='NqdE9'><dir id='NqdE9'><q id='NqdE9'></q></dir></style></legend>
      <i id='NqdE9'><tr id='NqdE9'><dt id='NqdE9'><q id='NqdE9'><span id='NqdE9'><b id='NqdE9'><form id='NqdE9'><ins id='NqdE9'></ins><ul id='NqdE9'></ul><sub id='NqdE9'></sub></form><legend id='NqdE9'></legend><bdo id='NqdE9'><pre id='NqdE9'><center id='NqdE9'></center></pre></bdo></b><th id='NqdE9'></th></span></q></dt></tr></i><div id='NqdE9'><tfoot id='NqdE9'></tfoot><dl id='NqdE9'><fieldset id='NqdE9'></fieldset></dl></div>

        <small id='NqdE9'></small><noframes id='NqdE9'>

      1. 自定义形式的 Drupal Imagfield/Filefield

        时间:2023-06-22
        • <tfoot id='eSaRZ'></tfoot>

              <tbody id='eSaRZ'></tbody>

          1. <legend id='eSaRZ'><style id='eSaRZ'><dir id='eSaRZ'><q id='eSaRZ'></q></dir></style></legend>

                <bdo id='eSaRZ'></bdo><ul id='eSaRZ'></ul>

                • <small id='eSaRZ'></small><noframes id='eSaRZ'>

                  <i id='eSaRZ'><tr id='eSaRZ'><dt id='eSaRZ'><q id='eSaRZ'><span id='eSaRZ'><b id='eSaRZ'><form id='eSaRZ'><ins id='eSaRZ'></ins><ul id='eSaRZ'></ul><sub id='eSaRZ'></sub></form><legend id='eSaRZ'></legend><bdo id='eSaRZ'><pre id='eSaRZ'><center id='eSaRZ'></center></pre></bdo></b><th id='eSaRZ'></th></span></q></dt></tr></i><div id='eSaRZ'><tfoot id='eSaRZ'></tfoot><dl id='eSaRZ'><fieldset id='eSaRZ'></fieldset></dl></div>
                  本文介绍了自定义形式的 Drupal Imagfield/Filefield的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我已经创建了一个包含此功能的模块:

                  i have created a module with this among others this function in it:

                  <?php
                  function ils_ladda_upp_form() {
                      $form['upload'] = array(
                          '#method' => 'post',
                          '#attributes' => array(
                              'enctype' => 'multipart/form-data',
                          )
                      );
                      $form['upload']['album_name'] = array(
                          '#type' => 'textfield',
                          '#title' => t('Albumnamn'),
                          '#required' => 1
                      );
                      $form['upload']['album_location'] = array(
                          '#type' => 'textfield',
                          '#title' => t('Plats'),
                      );
                      $form['upload']['album_date'] = array(
                          '#type' => 'date',
                          '#title' => t('Datum'),
                          '#required' => 1,
                          '#suffix' => '(d bilderna togs)'
                      );
                      $form['upload']['album_description'] = array(
                          '#type' => 'textarea',
                          '#title' => t('Beskrivning'),
                          '#resizable' => false,
                      );
                      $form['upload']['school'] = array(
                          '#type' => 'hierarchical_select',
                          '#title' => t('Skola & Klass'),
                          '#size' => 1,
                          '#required' => 1,
                          '#config' => array(
                              'module' => 'hs_taxonomy',
                              'params' => array(
                              'vid' => 1,
                              ),
                              'save_lineage'    => 0,
                              'enforce_deepest' => 0,
                              'entity_count'    => 0,
                              'require_entity'  => 0,
                              'resizable'       => 0,
                              'level_labels' => array(
                              'status' => 0,
                              'labels' => array(
                                  0 => t('Main category'),
                                  1 => t('Subcategory'),
                                  2 => t('Third level category'),
                              ),
                          ),
                              'dropbox' => array(
                              'status'   => 0,
                              'title'    => t('All selections'),
                              'limit'    => 0,
                              'reset_hs' => 1,
                          ),
                              'editability' => array(
                              'status'           => 0,
                              'item_types'       => array(),
                              'allowed_levels'   => array(
                              0 => 0,
                              1 => 0,
                              2 => 1,
                              ),
                              'allow_new_levels' => 0,
                              'max_levels'       => 3,
                          ),
                              # These settings cannot be configured through the UI: they can only be
                              # overridden through code.
                              'animation_delay'    => 400,
                              'special_items'      => array(),
                              'render_flat_select' => 0,
                              'path'               => 'hierarchical_select_json',
                          ),
                          #'#default_value' => '83',
                      );
                      $form['upload']['file'] = array(
                          '#type' => 'file',
                          '#title' => t('Bild'),
                      );
                      $form['upload']['name'] = array(
                          '#type' => 'textfield',
                          '#required' => true,
                          '#title' => t('Ditt namn')
                      );
                      $form['upload']['submit'] = array('#type' => 'submit', '#value' => t('Ladda upp'));
                      return $form['upload'];
                  }
                  ?>
                  

                  是否可以在表单中插入 CCK 文件字段/图像字段?如果是这样,我该怎么做?

                  Is it possible to insert a CCK Filefield/imagefield in the form? If so, how do i do it?

                  Drupal v. 6.15

                  Drupal v. 6.15

                  问候,
                  乔尔

                  推荐答案

                  喜欢这个吗?http://sysadminsjourney.com/content/2010/01/26/display-cck-filefield-or-imagefield-upload-widget-your-own-custom-form

                  这篇关于自定义形式的 Drupal Imagfield/Filefield的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 hook_views_query_alter() 中添加 JOIN 语句 下一篇:添加 url() 会破坏 hook_mail 实现

                  相关文章

                  <legend id='2gOtw'><style id='2gOtw'><dir id='2gOtw'><q id='2gOtw'></q></dir></style></legend>
                    <bdo id='2gOtw'></bdo><ul id='2gOtw'></ul>
                  1. <tfoot id='2gOtw'></tfoot>

                      <small id='2gOtw'></small><noframes id='2gOtw'>

                    1. <i id='2gOtw'><tr id='2gOtw'><dt id='2gOtw'><q id='2gOtw'><span id='2gOtw'><b id='2gOtw'><form id='2gOtw'><ins id='2gOtw'></ins><ul id='2gOtw'></ul><sub id='2gOtw'></sub></form><legend id='2gOtw'></legend><bdo id='2gOtw'><pre id='2gOtw'><center id='2gOtw'></center></pre></bdo></b><th id='2gOtw'></th></span></q></dt></tr></i><div id='2gOtw'><tfoot id='2gOtw'></tfoot><dl id='2gOtw'><fieldset id='2gOtw'></fieldset></dl></div>