![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
drupal7 example module
文章平均质量分 81
xieyanxy9
这个作者很懒,什么都没留下…
展开
-
文件上传,managed_file
function image_example_style_form($form, &$form_state) { $form['image_example_image_fid'] = array( '#title' => t('Image'), '#type' => 'managed_file', '#upload_valida...原创 2013-10-08 16:34:21 · 190 阅读 · 0 评论 -
代码添加默认的image style
/** * Implements hook_image_default_styles(). * *这里会增加新的图片样式, */function image_example_image_default_styles() { //这个函数返回一个数组(image style中的各个样式), //key:是机读名称,机读名称的定义是有规范的,为了避免机读名称命名...原创 2013-10-09 16:49:46 · 171 阅读 · 0 评论 -
文件上传,file
function form_example_tutorial_10($form_state) { // If you are familiar with how browsers handle files, you know that // enctype="multipart/form-data" is required. Drupal takes care of that, so...原创 2013-10-09 17:02:17 · 79 阅读 · 0 评论 -
ajax 分步向导
function ajax_example_wizard($form, &$form_state, $no_js_use = FALSE) { $form['#prefix'] = '<div id="wizard-form-wrapper">'; $form['#suffix'] = '</div>'; $form['#tree'] = TRU...原创 2013-10-11 10:27:53 · 95 阅读 · 0 评论 -
ajax 添加相同的表单
function ajax_example_add_more($form, &$form_state, $no_js_use = FALSE) { $form['#tree'] = TRUE; $form['names_fieldset'] = array( '#type' => 'fieldset', '#title' => t('Peopl...原创 2013-10-11 11:18:23 · 71 阅读 · 0 评论