Closed (fixed)
Project:
Webform
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Mar 2009 at 13:45 UTC
Updated:
18 Jun 2013 at 23:18 UTC
I created a new webform. Under webform setting it's asking me to fill the title (mandatory). I am not talking about the title for fields here. I dont want the title to be displayed when the form is displayed. how can i get rid of it?
Comments
Comment #1
quicksketchAll nodes must have a title, since the title is used to show the node in listings in the administration sections.
You can hide the title from display by theming your nodes to remove the title. Copy 'node.tpl.php' in your theme and rename it to 'node-webform.tpl.php', then remove the $title variable.
Comment #2
Andric Villanueva commentedNever mind. I out-did myself with this one.
Comment #3
quicksketchComment #4
wolfmarter commentedHey i reopened this tag because i have tried to remove the title of my webform but it did not work.
I copied the node.tpl.php in my theme folder and renamed it. Then i removed the Tag:
but nothing happened. I also tried to give the title a name instead of the $title variable but nothing. Do i have to declare the node-webform.tpl.php somewhere in the theme?
Thanks for some help
Wolfmarter
Comment #5
quicksketchYou need to have both node.tpl.php and node-webform.tpl.php in your theme directory for this to work. Also make sure you clear your Drupal caches after copying the files in.
Comment #6
wolfmarter commentedThank you for ypour help it worked. This is an awesome Module.
Regards
Wolfmarter
Comment #7
truyenle commentedFor my case, if I remove $content=> there'll be no content but if I remove the $title, it is still there somehow??? Clear cache didn't help.
Comment #8
wolfmarter commentedyou must have missed a $title tag somewhere. post your code an then we will be able to help you.
regards
wolfmarter
Comment #9
truyenle commentedHere is the code of node-webform.tpl.php wolfmarter,
If I view the webform node => still the title. I did clear cache, visite modules pages, etc. Doesn't work.
But then I found a post somewhere saying that I should use preprocess under template.tpl.php, it works. Here is the code:
Comment #10
Hunabku commentedThanks, i spent a lot of time trying to get templates to work and then i found your post.
If you want to change the name for individual forms use the nid of your webform - ex 1000
You don't need to test if empty &vars and type is webform, just go with:
Comment #11
F Kay commentedHi Hunabku
In what file dit you put this code?
And will it also work in Drupal 7?
Does this title will also appear in the tabheader of the webbrowser?
Because that is the problem that i'm having right now.
I have two different webforms and they have both a different title but the title is not visible in the tab-header of the page.
Can you help me whit this?
Regards
Comment #12
quicksketchMost of the solutions in this issue will work in D7 but the file names have changed. Instead of "node-webform.tpl.php", in D7 it's "node--webform.tpl.php". Unfortunately none of the posted comments here have anything to do with the page title in the HEAD tag. @F Kay, if you're still having this problem, please open a separate issue describing your question.