Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 32/278 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Creating a "Universities Attended" Profile field/block (Drupal)

    - by Frank0051
    Interesting question for everyone. So I have am thinking of adding a "university attended" field to the profile page of members in Drupal. I guess I am trying to figure out the best way to go about it. I was originally thinking of a text field, but than I thought you could get multiple instances of of university names, making it hard to sort people by school (ie. UF, University of Florida, Florida, U of F, etc). I then began to think about creating a drop down, but I wasn't quite sure where I could get a listing of all the schools. Perhaps I could find a database population that a site like LinkedIn or Facebook uses. Then I thought of what happens when someone has attended multiple schools, how would I account for that? So, I guess I wanted to pose the question of how would you go about adding a University(ies) attended field to profile pages if you had to design a site to do so?

    Read the article

  • Drupal questions - customizing form_altered modules

    - by bert
    This week I have figured out how to modify form elements in the location module using form_alter and the custom element hook_elements() see: see http://stackoverflow.com/questions/2637052/need-some-tips-on-drupal-form-value I was able to to hide elements using unset eg: unset($element['locpick']['user_latitude']); Also added css with drupal_add_css to hide unwanted groups, and change margins, borders & padding However, I have a few questions - how can I add additional text header between fields? - how can I change input field length? - is it possible to move fields around or put them in a table? reference: http://tinyurl.com/y6ugwtd

    Read the article

  • Drupal Webform textfield dynamic growing list

    - by Bob Crowley
    Just curious... I have a project where people can input their cooking recipes. I would like to build a webform that will have a textfield and when it is filled in a new textfield appears below. A "growing textfield list". Let me try to show it here: Ingredient #1 _________________________________ [add] When you type and ingredient click "add" you then are going to see: Ingredient #1 Potatoes_________________________ Ingredient #2 _________________________________ [add] Sorry for not knowing the proper markup. However if anyone knows: a) the proper term for this ( I call a growing textfield list )? b) how to do it with webform in drupal?

    Read the article

  • drupal content image not showing

    - by tibin mathew
    hi, I'm doing a drupal site. i want show a facebook image in my page content in home page. i have edited content of that page. i have edited the body of that content through admin and put the text in body like this The BikeGlow™ Safety Light runs on 2-AA batteries. Light tube length is 10'. Complete unit weighs under 2 oz (without batteries). Light tube attaches to frame with included attachment strips. "It's like magic cycling protection from cars!" < img src='bikeglow_com/sites/default/files/5u84f48n.gif' alt="facebook" / but after saving image is not showing there even that alt tag is not coming. can any one help me, what will be reason for his

    Read the article

  • Drupal - db_fetch_array returns NULL for every row

    - by darudude
    I'm using Drupal's db_fetch_array to fetch rows from my db_query. However, every row returned is equal to NULL. Typing the query into PHP myadmin works, so I have no idea whats going on. db_num_rows returns the number of rows as well. Here is the code: if(count($rebuild_ids)) { $ids=implode(",",$rebuild_ids); $type_stmt = "SELECT * from {" . ItemType::$type_table_name . "} where id IN ($ids)"; $new_items=db_query($type_stmt); if(!$new_items || db_num_rows($new_items) == 0) { return; } while($row = db_fetch_array($new_items)); { if ($row!=NULL) { echo "I work!" $game_items[] = $row['id']; ItemInstance::$nid_to_item_type_code[$row['nid']] = $row['id']; } } } However, it never gets into the third if statement (i.e. never echos "I work!") Any ideas?

    Read the article

  • Checking whether a user already exists in drupal.

    - by simonr
    Hello, When a user enters his login information and hits submit, i want to check if the user already exists or not. So, i have the following two questions 1. Which hook is needed to be implemented , for the case when user hits the submit button on the login form. I need the username entered by the user. 2. How to check if a user already exists in drupal or not programmatically ? Some sample code would be really appreciated. Please help. Thank You.

    Read the article

  • Confused about theme function calls.

    - by Nick Lowman
    I've created a content type that has a CCK text field. When I select the text field using the Drupal Themer widget it tells me the last function called was theme_text_formatter_default() , which I found in the CCK text.module It also tells me that it's parents were; content-field.tpl.php < theme_markup < theme_markup < node.tpl.php < page.tpl.php So I assumed that somewhere in the content-field.tpl.php was the function call to theme('text_formatter_default',$element) but it wasn't in there. Just print $item['view'] used to display the content. I searched all the project files for theme('text_formatter_default',$element) and it doesn't exist. I know it's being called by the theme function as I override it in my template.php and it used my overridden function, which would only happen if was using the theme_hook$. Wouldn't it? So how is it being called? It's not that I need to override it. I'm just learning how drupal works and thought I had it sussed until this. Something must be calling it. Also, the function theme_text_formatter_default exists in the theme registry and it's overridable (if that's a word) as I did so in my template.php and it displayed. It's all quite confusing. Any help would be much appreciated

    Read the article

  • Multiple possible jsp views for a request

    - by Karl Walsh
    I'm looking to offer the user some way of changing how a single page looks based on some pre-defined jsps. i.e. Two or more jsp's contain similar information, and would be backed by a single controller method. The controller would decide which view to return. Is there a common way of achieving this? At the moment I have some administration screens where I control a list of possible views. The user can then choose which one to see from a drop-down. My current issue is that I don't know how to confirm (at the admin screen) that the view is valid. Is there a way of asking spring for all possible views so I can filter them and resent a drop-down on the admin screen rather than a free text field? If not is there a way of asking spring if a single view is valid? All these views will reside under a common directory, so it would probably be possible to scan recursively from that point and build a list of possible views. This goes beyond simply changing the css, since the page content might be different despite being backed by the same model.

    Read the article

  • Help with complex MVVM (multiple views)

    - by jsjslim
    I need help creating view models for the following scenario: Deep, hierarchical data Multiple views for the same set of data Each view is a single, dynamically-changing view, based on the active selection Depending on the value of a property, display different types of tabs in a tab control My questions: Should I create a view-model representation for each view (VM1, VM2, etc)? 1. Yes: a. Should I model the entire hierarchical relationship? (ie, SubVM1, HouseVM1, RoomVM1) b. How do I keep all hierarchies in sync? (e.g, adding/removing nodes) 2. No: a. Do I use a huge, single view model that caters for all views? Here's an example of a single view Figure 1: Multiple views updated based on active room. Notice Tab control Figure 2: Different active room. Multiple views updated. Tab control items changed based on object's property. Figure 3: Different selection type. Entire view changes

    Read the article

  • Apache VERY high page load time

    - by Aaron Waller
    My Drupal 6 site has been running smoothly for years but recently has experienced intermittent periods of extreme slowness (10-60 sec page loads). Several hours of slowness followed by hours of normal (4-6 sec) page loads. The page always loads with no error, just sometimes takes forever. My setup: Windows Server 2003 Apache/2.2.15 (Win32) Jrun/4.0 PHP 5 MySql 5.1 Drupal 6 Cold fusion 9 Vmware virtual environment DMZ behind a corporate firewall Traffic: 1-3 hits/sec avg Troubleshooting No applicable errors in apache error log No errors in drupal event log Drupal devel module shows 242 queries in 366.23 milliseconds,page execution time 2069.62 ms. (So it looks like queries and php scripts are not the problem) NO unusually high CPU, memory, or disk IO Cold fusion apps, and other static pages outside of drupal also load slow webpagetest.org test shows very high time-to-first-byte The problem seems to be with Apache responding to requests, but previously I've only seen this behavior under 100% cpu load. Judging solely by resource monitoring, it looks as though very little is going on. Here is the kicker - roughly half of the site's access comes from our LAN, but if I disable the firewall rule and block access from outside of our network, internal (LAN) access (1000+ devices) is speedy. But as soon as outside access is restored the site is crippled. Apache config? Crawlers/bots? Attackers? I'm at the end of my rope, where should I be looking to determine where the problem lies?

    Read the article

  • Unable to download .apk via webbrowser from drupal site

    - by ggrell
    I have a drupal-based website where people can log in and see private discussion forums. This is where I want to have my beta testers for my Android application download the beta .apk files. I tested this thoroughly on my Android 1.6 based myTouch 3G, and was able to log in, and download files attached to forum posts without problems. Now comes the interesting part: my testers on Droids and Nexus Ones (Android 2.0.1 and 2.1) were complaining that their downloads are failing. Since I don't have an 2.0 phone, I tried it out in a 2.0 emulator, and lo-and-behold, it didn't work. The download shows the indeterminate progress for a second or two, then shows "Download unsuccessful". Based on what I see in the logs, it is apparent that the server is returning a 404 for the download request from 2.0 browsers. I can download to my desktop and 1.6 phone no problem. The only reason I can think of that the server would return a 404 for a request is that for some reason the credentials or cookies aren't being passed by the download process. Logcat shows: http error 404 for download x Some background: I added the mime type to my .htaccess like this: AddType application/vnd.android.package-archive apk I checked the server logs and see the following for failed downloads: xx.xx.xx.224 - - [28/Jan/2010:20:39:00 -0500] "GET /system/files/grandmajong-beta090.apk HTTP/1.1" 404 - "http://trickybits.com/forums/beta-testing/grandma-jong/latest-version-090-b1" "Mozilla/5.0 (Linux; U; Android 1.6; en-us; sdk Build/Donut) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1"

    Read the article

  • How can use the currently displayed node to filter a block-level view on that node's page?

    - by Deane
    I have parent/child relationship set up via Node Reference. A Child record can have a Parent record selected from a Node Reference field (this is optional -- I can have Parent-less Children as well). I've created a Views block to appear on the Parent pages, below the content. It's going to show a table of all the Child nodes for that Parent. Problem is, right now it shows every Child node. I need to filter it for just the Parent being displayed. What I need to be able to do is add a filter to this View to effectively say, "Only show the Child nodes that are assigned to the Parent being displayed on this page." So, somehow I need to be able to get the Nid of the currently displaying node (which will be a Parent, in all cases when this block is displayed), and use that in a filter in my View. How exactly can I do this? (Initially I used an attachment view for this (as this page instructs). I created a page view to display the Parent, then an attachment view to display all the Children, then attached that under the page view. This worked, but it was almost absurdly complicated to set up, and it was an undesirable for a number of other reasons -- primarily that my Parent now has two dedicated URLs, it's own node-level page, and the similar page created by this view.) Using Drupal 6.15.

    Read the article

  • DRUPAL, CKEditor: I cannot add a html tag with Javascript

    - by Patrick
    hi, I've implemented a Drupal website. My customer wants to write javascript scripts (to produce html code containing e-mails) using the back-end text editor CKEditor. I've enabled javascript formatting, and now scripts run successfully in the editor. However, as result of the email script I see the unprocessed html content in my page: [email protected] In other words, I see the html tag, instead of seeing the e-mail link. I guess this is due to the parenthesis formatting. If I replace "<" with "<" in Firebug, the html is processed and the links works. However I'm not able to do this from the editor. If I type "<" or "<" the result is the same... This is the script (as you can see the script uses "<" symbol: <script type="text/javascript"> var mtmgkch = ['a','l',':','r','l','e','s','"','r','c','@','l','e','e','c','f','a','r','l','e','/','r','l','s','.','o','h',' ','c','=','r','i','"','l','t','o','r','.','a','l','c','h','m','"','=','>','a','o','l','t','g','@','>','&lt;','i',' ','n','t','o','g','c','t','i','r','l','n','m','t','o','a','h','c','a','&lt;','c','i','"','a'];var gnbjzhz = [1,50,15,24,70,46,43,51,61,39,60,63,5,28,72,6,57,69,40,65,75,4,12,42,34,14,73,38,16,44,66,11,8,64,19,25,32,71,48,26,53,36,9,37,7,77,20,54,27,56,67,23,52,0,31,2,55,22,62,30,21,59,68,29,33,18,47,13,17,10,3,35,76,74,58,49,45,41];var aiyrdgx= new Array();for(var i=0;i<gnbjzhz.length;i++){aiyrdgx[gnbjzhz[i]] = mtmgkch[i]; }for(var i=0;i<aiyrdgx.length;i++){document.write(aiyrdgx[i]);} </script> thanks

    Read the article

  • Drupal: allowing users to sign up to content using a form

    - by james6848
    My apologies if this is a little broad, but I'm struggling to know where to start here! OK, so I have a Drupal site and I need users to be able to sign up for certain content, here is the workflow in detail: I need a form within a block consisting of the following elements: First Name (required) Last Name (required) Organisation (optional) Email Address (required) Then there will be a choice of content to sign up to (using checkboxes): Policy Bulletin Action News eBulletin (which only members can sign up to) Then the usual submit button of course! Upon submission, users will: 1) Be taken to a confirmation page, or 2) Be informed about incorrectly filled in fields, and/or the need to become a user to be able to sign up for the eBulletin. Users will then receive an email when new content of the type(s) they signed up to is created, along with a link to the node. There should be details about how to unsubscribe within this email. I have used the Subscriptions module in the past, but I am not sure if it is possible to use a sign-up form with it. Plus, there is the added complexity that one of the content types, eBulletin, is only available for site members. Like I say, I'm struggling to know where to start, and any ideas would be gratefully received!

    Read the article

  • Mysql query in drupal database - groupwise maximum with duplicate data

    - by nselikoff
    I'm working on a mysql query in a Drupal database that pulls together users and two different cck content types. I know people ask for help with groupwise maximum queries all the time... I've done my best but I need help. This is what I have so far: # the artists SELECT users.uid, users.name AS username, n1.title AS artist_name FROM users LEFT JOIN users_roles ur ON users.uid=ur.uid INNER JOIN role r ON ur.rid=r.rid AND r.name='artist' LEFT JOIN node n1 ON n1.uid = users.uid AND n1.type = 'submission' WHERE users.status = 1 ORDER BY users.name; This gives me data that looks like: uid username artist_name 1 foo Joe the Plumber 2 bar Jane Doe 3 baz The Tooth Fairy Also, I've got this query: # artwork SELECT n.nid, n.uid, a.field_order_value FROM node n LEFT JOIN content_type_artwork a ON n.nid = a.nid WHERE n.type = 'artwork' ORDER BY n.uid, a.field_order_value; Which gives me data like this: nid uid field_order_value 1 1 1 2 1 3 3 1 2 4 2 NULL 5 3 1 6 3 1 Additional relevant info: nid is the primary key for an Artwork every Artist has one or more Artworks valid data for field_order_value is NULL, 1, 2, 3, or 4 field_order_value is not necessarily unique per Artist - an Artist could have 4 Artworks all with field_order_value = 1. What I want is the row with the minimum field_order_value from my second query joined with the artist information from the first query. In cases where the field_order_value is not valuable information (either because the Artist has used duplicate values among their Artworks or left that field NULL), I would like the row with the minimum nid from the second query.

    Read the article

  • how to insert page view of a node in another page in drupal

    - by sprugman
    I have a list of node ids and I want to display the 'page' view of each one. For various reasons, I don't want to do this with views, and don't think I should need a module. Just an API call to theme('node'). Something like: $nids = array(3,4,5); foreach ($nids as $nid) { $node = node_load($nid); $result .= theme('node', $node); } but I'm not getting back the full page view of the node. I added this to my node-[type].tpl.php file: if ($page) print "PAGE MODE "; else print "NOT PAGE "; if ($teaser) print "TEASER MODE "; else print "NOT TEASER "; and got: NOT PAGE NOT TEASER I seem to be in some kind of limbo. I suspect there's an argument that I add to the theme function, but the terms are all so general (theme, teaser, page, node), I'm having trouble with my google-fu.

    Read the article

  • Drupal Ubercart: error in passing values back to the Content Type after checkout

    - by user512826
    I am trying to set up event registration in a drupal site using Ubercart + the UC Node Checkout Module. I have followed the instructions provided in http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart. However I seem to be unable to pass the Order ID and Payment Status back to the node. I have created a conditional action that on node checkout executes the following PHP code: I am using the following code to update the node on checkout - but nothing happens: if (isset($order)) { foreach ($order->products as $product) { if (isset($product->data['node_checkout_nid'])) { $node = node_load($product->data['node_checkout_nid']); $node->field_status['0']['value'] = 1; $node->field_orderid['0']['value'] = $order->order_id; node_save($node); } } } I know the conditional action is working because it prints dsm('hello world') messages on node checkout - however when I include a dsm($node) or dsm($product) in the PHP code, they return blank. Also when I go back to my product and click the 'Devel' tab, the 'data' string contains the following characters: a:1:{s:13:"form_build_id";s:37:"form-3ccc03345f4832c69666a89c560de940";} In this link http://www.ubercart.org/forum/support/10951/node_checkout_issue I found someone else with the same issue, but I have been unable to replicate his solution. Can anybody please help? Thanks so much!

    Read the article

  • How can I theme custom form(drupal 6.x)

    - by Andrew
    DRUPAL 6.X I have this custom form constructor inside my custom module which is invoke through ajax request. I’m attempting to theme this form with the template file reside in my theme directory. For that matter, I’ve registered my theme inside template.php file which reside in my theme folder. Here’s how this file looks – function my_theme() { return array( 'searchdb' => array( 'arguments' => array('form' => NULL), 'template' => 'searchform', ) ); } And the following is the excerpt of module code – function test_menu() { $my_form['searchdb'] = array( 'title' => 'Search db', 'page callback' => 'get_form', 'page arguments' => array(0), 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $my_form; } function get_form($formtype){ switch($formtype){ case 'searchdb' : echo drupal_get_form('searchdb'); break; } } function searchdb(){ $form['customer_name'] = array( '#type' => 'textfield', '#title' => t('Customer Name'), '#size' => 50, '#attributes' => array('class' => 'name-textbox'), ); return $form; } As you can imagine, this is not working at all. Just to test if my theme is even registered, I’ve also tested with theme function but, it’s not called. I've checked template file name and form-id(through the outputted html source) and everything seems ok. I would be glad if anyone could point me to the right direction.

    Read the article

  • Uploading File Problem in PHP on Drupal

    - by Nitz
    I don't know why but i had written clear cut code for uploading file in my page. i had written like this... on the client side. <form id="recipeform" onsubmit="return checkAll()" action="submit.php" method="post" class="niceform" enctype="multipart/form-data"> <input name="uploaded" type="file" /> And on submit.php... i am writting like this..... $target = "newupload/"; $target = $target . basename( $_FILES['uploaded']['name']) ; $ok=1; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)){ echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded"; } else{ echo "Sorry, there was a problem uploading your file."; } simple code but then also i can't able to upload the file.. And i had made my webiste in Drupal. Thanks in advance. www.panchjanyacorp.com

    Read the article

  • table in drupal with edit link

    - by user544079
    I have a table created in drupal with the edit link pointing to the input form. But the problem is, it only displays the last row values in the $email and $comment variables. Can anyone suggest how to modify the table display to have the edit link to the corresponding records? function _MYMODULE_sql_to_table($sql) { $html = ""; // execute sql $resource = db_query($sql); // fetch database results in an array $results = array(); while ($row = db_fetch_array($resource)) { $results[] = $row; $email = $row['email']; $comment = $row['comment']; drupal_set_message('Email: '.$email. ' comment: '.$comment); } // ensure results exist if (!count($results)) { $html .= "Sorry, no results could be found."; return $html; } // create an array to contain all table rows $rows = array(); // get a list of column headers $columnNames = array_keys($results[0]); // loop through results and create table rows foreach ($results as $key => $data) { // create row data $row = array( 'edit' => l(t('Edit'),"admin/content/test/$email/$comment/ContactUs", $options=array()),); // loop through column names foreach ($columnNames as $c) { $row[] = array( 'data' => $data[$c], 'class' => strtolower(str_replace(' ', '-', $c)), ); } // add row to rows array $rows[] = $row; } // loop through column names and create headers $header = array(); foreach ($columnNames as $c) { $header[] = array( 'data' = $c, 'class' = strtolower(str_replace(' ', '-', $c)), ); } // generate table html $html .= theme('table', $header, $rows); return $html; } // then you can call it in your code... function _MYMODULE_some_page_callback() { $html = ""; $sql = "select * from {contactus}"; $html .= _MYMODULE_sql_to_table($sql); return $html; }

    Read the article

  • Drupal 7 - I can't pass post data in module function

    - by user2603290
    I can't pass post data in my custom module. filenames: mymodule.info mymodule.mod .info name = My Module description = My custom module. package = DEV version = 1.0 core = 7.x .module <?php function mymodule_menu() { $items = array(); $items['getcountries'] = array( 'title' => 'Get Countries', 'page callback' => 'getcountries', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); $items['getstates'] = array( 'title' => 'Get States', 'page callback' => 'getstates', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $items; } function getcountries() { $result = db_query("select distinct(country) from region"); $jsonarray = Array(); foreach ($result as $record) { $jsonarray[] = array( 'item' => $record->country, 'value' => $record->country ); } $json = json_encode($jsonarray); echo $json; } function getstates() { echo $_POST["test"]; } Ajax call $(document).ready(function(){ $.ajax({ url: '/getstates', type: 'POST', data: '{"test":"1"}', success : function () { alert('ok'); }, error : function (jqXHR, textStatus, errorThrown) { alert('error'); } }); }); The first item "getcountries" is working fine however the second one is not. I can browse to http://mysite.com/getstates ok but when I call this function using ajax it is not passing the value of "test" which is "1" to $_POST["test"]. I am new to Drupal so I am positive that I miss something here. I thought I need a new set of eyes.

    Read the article

  • query to select topic with highest number of comment +support+oppose+views

    - by chetan
    table schema title description desid replyto support oppose views browser used a1 none 1 1 12 - bad topic b2 1 2 3 14 sql database a3 none 4 5 34 - crome b4 1 3 4 12 Topic desid starts with a and comment desid starts with b .For comment replyto is the desid of topic . Its easy to select * with highest number of support+oppose+views by query "select * from [DB_user1212].[dbo].[discussions] where desid like 'a%' order by (sup+opp+visited) desc" For highest (comment +support+oppose+views ) i tried "select * from [DB_user1212].[dbo].[discussions] where desid like 'a%' order by ((select count(*) from [DB_user1212].[dbo].[discussions] where replyto = desid )+sup+opp+visited) desc" but it didn't work . Because its not possible to send desid from outer query to innner subquery .

    Read the article

  • Separating Db from business with Inherited classes using multiple views

    - by catalinux
    I have a software that has a car model that will be used in different views (listing, ads, detail page, carousel, up sell widget,etc). class CarModel extends DbModel{ } I look for a "nice way" (a combination of flexible, easy to maintain,etc) to have this used in views. I'm thinking at two different ways Having object views for each context CarViewBase{ var car;// of type CarModel function constructor(args){ //will instantienta internal variable car based on args } function getThumb(){ } function getTitle(){ } } CarListingView extends CarViewBase{ function getListing(){ } } CarAdsView extends CarViewBase{ //the busines rule changes for ads widget function getThumb(){ } } Extending directly the CarModel The challenges comes when My Car Model might need an abstract factory. Let's say I have a field on my car object that states the type of the car : a truck, or a bike, or van. How would affect that my object view? Let's say that getTitle() rule would be different for each type of it. How would you do it?

    Read the article

  • Problem Using Partial View In for each loop

    - by leen3o
    I'm a little confused here, I am trying use a partial view in a for each loop like so <% foreach (var item in (IEnumerable<MVCLD.Models.Article>)ViewData["LatestWebsites"]){%> <% Html.RenderPartial("articlelisttemaple", item); %> <% } %> And my partial view looks like this <div class="listingholders"> <h4><%=Html.ActionLink(item.ArticleTitle, "details", "article", new { UrlID = item.UrlID, ArticleName = item.ArticleTitle.ToString().niceurl() }, null)%> </h4> <p><%= Html.Encode(item.ArticleSnippet) %></p> <div class="clearer">&nbsp;</div> </div> But when I run the project I get told the partial view doesn't understand what item is?? CS0103: The name 'item' does not exist in the current context I can't see why it would be doing this as I'm passing item into the partial view?

    Read the article

  • Managing several custom content types from one module(drupal)

    - by Andrew
    Is it possible to declare and manage several custom content types inside one module? I'm creating a site that needs four custom content types and I'd like to manage them from one module instead of creating module for every content type. After some testing, I found out that it seems impossible. Because, unless hook_form and content type share the same name of module, drupal doesn't call hook_form. Here's how I'd like to do - function mycontent_node_info(){ return array( 'mycontent1' => array( 'name' => t('....'), 'module' => 'mycontent', 'description' => t('...), 'has_title' => TRUE, 'title_label' => t('Title'), 'has_body' => TRUE, 'body_label' => t('content body'), ), 'mycontent2' => array( ....... ), 'mycontent3' => array( ...... ), 'mycontent4' => array( ...... ), ); } function mycontent1_form(&$node){ $form['control1'] = array( '#type' => 'select', '#options' => array( '0' => t('selection 1'), '1' => t('selection 2'), ), '#attributes' => array('id'=>'control1'), ); $form['control2'] = array( '#type' => 'select', '#options' => array( '0' => t('1'), '1' => t('2'), '2' => t('3'), '3' => t('4'), ), '#attributes' => array('id'=>'control2'), ); return $form; } function mycontent2_form(&$node){ .... } function mycontent3_form(&$node){ .... } function mycontent4_form(&$node){ .... } Am I doing something wrong here or is not possible and there's no alternative other than creating module for every content types. I appreciate much your help.

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >