For some reason the forum parsed my last question wierdly.

How can I remove this text:


Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>  

    * Lines and paragraphs break automatically.

More information about formatting options

from public facing forms?

Comments

jaskegreen’s picture

I looks like you need to change your Input Format to Full HTML. Go to Administer > Input Formats and make the change there.

Jason
JC SWAK - web hosting & design
www.jcswak.com

Rotwang’s picture

No, I don't want full HTML to be entered by users into the field. I just want to remove that notification text.

jaskegreen’s picture

So you want to allow users to enter code, but you don't want to tell them what code they can use. If this is the case, you may need to delve into code and comment out what you don't need.

I found if you comment out lines 161 and 162 of the filter.module, the code that you are filtering out is gone. This may or may not be what you're looking for and may not even be a complete fix. I've only tried it on one theme and one browser, but it should get you started.

If this again is not what you are wanting to do, please provide some background on why you want to remove the text.

Jason
JC SWAK - web hosting & design
www.jcswak.com

Rotwang’s picture

I only want to remove it for one form on the site. The reason I want to remove it is only because the client, the designer, wants me to.

Drupal forms seem very inflexible when it comes to design and layout visual stuff...

shawn.sh’s picture

You can use the CSS below to "hide" it from users...

ul.tips {display:none}

/* if your form or page has a unique identifier you can do this for only one form */

.form-email ul.tips {display:none}
jaskegreen’s picture

Thanks for backing me up on this. That was an easy fix.

Jason
JC SWAK - web hosting & design
www.jcswak.com

nn77’s picture

Which CSS do I need to make this change in?? Any help will be appreciated.

Thanks

adam_b’s picture

You don't need CSS - http://drupal.org/project/better_formats allows you to hide format tips.

aangel’s picture

Another way to do it is to theme the CCK form.

In template.tpl.php, add:

/*
 * Look for form name in filesystem and use it
 * instead of default -- good for theming CCK forms.
 */
function phptemplate_node_form($form) {
  // If php safe mode is on, file_exists() tests can fail on some UNIXs.
  if (file_exists(getcwd().'/'.path_to_theme().'/'.$form['type']['#value'].'_form.tpl.php')) {
    return _phptemplate_callback($form['type']['#value'].'_form', array('user' => $user, 'form' => $form));
  }
}

Now every time you add or edit a CCK node, it will look for a file in the form "nodetype_form.tpl.php".

In this file, do something like this:

<?php 
//print dprint_r($form);

// Remove occurences of Input Format.
unset($form['field_conference_summary'][0]['format']);
?>
<?php  print drupal_render($form['title']); ?><br />
<?php  print drupal_render($form['field_display_order']); ?><br />
<?php  print drupal_render($form['field_conference_type']); ?><br />
<?php  print drupal_render($form['field_start_date']); ?><br />
<?php  print drupal_render($form['field_conference_id']); ?><br />
<?php  print drupal_render($form['files']); ?><br />
<?php  print drupal_render($form['taxonomy']); ?><br />
<?php  print drupal_render($form['field_conference_summary']); ?><br>

<?php
unset($form['comment_settings']);
unset($form['og_nodeapi']);
unset($form['author']);
unset($form['path']);
unset($form['menu']);
unset($form['log']);
print drupal_render($form);
?>

Call drupal_render for all the fields you want. Unset the fields you don't want. Look at the output of dprint_r($form) to discover the names of things. dprint_r is available when you install devel module (you have installed devel, right?) and enable it for your role; otherwise use print_r.

codenamerhubarb’s picture

Thanks for this. I managed to customize my form a while back but I didn't know about the line unset($form['field_conference_summary'][0]['format']);

-------------------------------
My Drupal site: Download a Book.

haniamughal’s picture

Really enjoyed reading your article. I thought the example of using a three-column layout to break up that list was spot on. Several columns of text, in my opinion, are far more aesthetically pleasing than a single block and I also think that they read better too.
However, I also agree with your point about the potential downsides of using lengthy columns of text. I think this is where we can use other web technologies, like the ‘Back to top’ links for example, that are being seen more and more now to assist the user, without having to necessarily adjust the intended layout to accommodate for readability issues.

jojyjob’s picture

//Drupal 7: Follow Below steps

function custommodule_form_alter(&$form, &$form_state, $form_id){
if ($form_id == 'FORMID') {
        $form['#after_build'][] = 'custommodule_form_after_build';
}
 }

// afterbuild function
function  custommodule_form_after_build($form) {
    // We want this on a specific field
    $form['body']['und']['0']['format']['#access'] = FALSE;
    return $form;
}