Skip to main content
deleted 425 characters in body
Source Link
Serjas
  • 1.4k
  • 3
  • 16
  • 36

I want to hide certain elements in form using form_alter or a template file. I have read somewhere that in Drupal 7 , we can specify $form elements so it will not display in form, but I can't remember! Not unset() but some other function!

#update CODE used in custom-form tpl

<?php
echo drupal_render($form['title']);
echo drupal_render($form['body']);
echo drupal_render($form['uc_product_image']);
echo drupal_render($form['base']['prices']['sell_price']);
?>

<div style="display:none"><?php print drupal_render_children($form);  ?></div>

I can save the node with changes in titlt,body or image, but not sell_price!

I want to hide certain elements in form using form_alter or a template file. I have read somewhere that in Drupal 7 , we can specify $form elements so it will not display in form, but I can't remember! Not unset() but some other function!

#update CODE used in custom-form tpl

<?php
echo drupal_render($form['title']);
echo drupal_render($form['body']);
echo drupal_render($form['uc_product_image']);
echo drupal_render($form['base']['prices']['sell_price']);
?>

<div style="display:none"><?php print drupal_render_children($form);  ?></div>

I can save the node with changes in titlt,body or image, but not sell_price!

I want to hide certain elements in form using form_alter or a template file. I have read somewhere that in Drupal 7 , we can specify $form elements so it will not display in form, but I can't remember! Not unset() but some other function!

added 395 characters in body
Source Link
Serjas
  • 1.4k
  • 3
  • 16
  • 36

I want to hide certain elements in form using form_alter or a template file. I have read somewhere that in Drupal 7 , we can specify $form elements so it will not display in form, but I can't remember! Not unset() but some other function!

#update CODE used in custom-form tpl

<?php
echo drupal_render($form['title']);
echo drupal_render($form['body']);
echo drupal_render($form['uc_product_image']);
echo drupal_render($form['base']['prices']['sell_price']);
?>

<div style="display:none"><?php print drupal_render_children($form);  ?></div>

I can save the node with changes in titlt,body or image, but not sell_price!

I want to hide certain elements in form using form_alter or a template file. I have read somewhere that in Drupal 7 , we can specify $form elements so it will not display in form, but I can't remember! Not unset() but some other function!

I want to hide certain elements in form using form_alter or a template file. I have read somewhere that in Drupal 7 , we can specify $form elements so it will not display in form, but I can't remember! Not unset() but some other function!

#update CODE used in custom-form tpl

<?php
echo drupal_render($form['title']);
echo drupal_render($form['body']);
echo drupal_render($form['uc_product_image']);
echo drupal_render($form['base']['prices']['sell_price']);
?>

<div style="display:none"><?php print drupal_render_children($form);  ?></div>

I can save the node with changes in titlt,body or image, but not sell_price!

Tweeted twitter.com/#!/StackDrupal/status/243318044930211840
added 13 characters in body
Source Link
Bart
  • 6.9k
  • 2
  • 41
  • 57

I want to hide certain elements in form using form_alter or tpla template file.I I have read somewhere that in drupalDrupal 7 , we can specify $form elements so it will not display in form. But cant, but I can't remember! Not unset(). but some other function!

Please help

I want to hide certain elements in form using form_alter or tpl.I have read somewhere that in drupal 7 , we can specify $form elements so it will not display in form. But cant remember! Not unset(). some other function!

Please help

I want to hide certain elements in form using form_alter or a template file. I have read somewhere that in Drupal 7 , we can specify $form elements so it will not display in form, but I can't remember! Not unset() but some other function!

Source Link
Serjas
  • 1.4k
  • 3
  • 16
  • 36
Loading