Chaitanya Lakshmi
  • About Me
  • Job Duties
  • Knowledge Blog
  • Applications
  • Contact Us
    • Linked In
    • Facebook
  • About Me
  • Job Duties
  • Knowledge Blog
  • Applications
  • Contact Us
    • Linked In
    • Facebook

How to resolve "An illegal choice has been detected. Please contact the site administrator" error?

2/17/2012

0 Comments

 
‘#validated’ => ‘TRUE’ add this into your form elements definitions:


Example:
form['my_dynamic_select'] = array(
…
‘#type’ => ‘select’,
‘#validated’ => TRUE
…
)

Reason:
If we are using an input in AJAX related situation we will fill the input field like SELECT (dropdown) this error will shown in the interface.  Because when a value is not present in the page load will not allowed in form submission time.  So, the Drupal restricts this type of value.  This value is considered as illegal value.  Say for example an user can inject a set of value in our site and they can choose a particular value in it.

But our case is also same like injecting in sense of pushing a new set of values through AJAX.  So now and then we need to used the form field attribute "validate as True", to get a Permanent and Perfect solution too.
0 Comments

Why View module is so important in drupal?

2/17/2012

0 Comments

 
Views can be used to generate lists of content in various formats same as report generator works.
0 Comments

How we can define custom content types?

2/17/2012

0 Comments

 
We can install CCK (Content construction kit) module and create content types. We can define the structure of each content type too.
0 Comments

What is the user permission mechanism in drupal?

2/17/2012

0 Comments

 
We can create roles (moderators, proof readers, content admins etc) and we can permit each task to each role. A user can have 1 or many roles.
0 Comments

How drupal is altered?

2/17/2012

0 Comments

 
New module is developed by implementing hooks. Hooks are defined in the API. At certain events, drupal hook into our modules.E.g. When a page is request processing
0 Comments

What is the basic installation script that we have to deal with while installing Drupal?

2/17/2012

0 Comments

 
It is the settings.php file. The script will automatically populates database tables and configures the correct settings in the settings.php file.
It also explains how to do a “multi site” installation.
0 Comments

What is a block?

2/17/2012

0 Comments

 
Block is a section in a page (recent posts, news, vote to something, login box, navigation), which is movable to regions (header, footer, content top etc) in a page. Blocks can be configured to show/hide only to certain type of user roles, url patterns or some other advanced criteria. (Content area is not a block)
0 Comments

How to add Javascript file in Module hook_init()?

2/17/2012

0 Comments

 
function modulename_init() {
  drupal_add_js(drupal_get_path('module', 'modulename') . '/js/modulerelated.js');
}
0 Comments

How to add Stylesheet CSS file in Module hook_init()?

2/17/2012

0 Comments

 
function modulename_init() {
   drupal_add_css(drupal_get_path('module', 'modulename')  .'/styles.css');
}
0 Comments

Top Drupal Modules for SEO (Search Engine Optimization)

2/17/2012

0 Comments

 
  1. Pathauto
  2. Google Analytics
  3. Nodewords
  4. Global Redirect
  5. Page Title
0 Comments
<<Previous
Forward>>

    Archives

    April 2012
    March 2012
    February 2012

    Categor

    All
    Ajax
    Api
    Cross Site Scripting
    Css
    Curl
    Design Patterns
    Drupal
    Exception Handling
    Htaccess
    Html
    Javascript
    Jquery
    Json
    Linux
    Mysql
    Oops
    Php
    Regular Expressions
    Web 2.0
    Webservices
    Wordpress
    Xhtml

    RSS Feed

Powered by Create your own unique website with customizable templates.