Search Results

Search found 143 results on 6 pages for 'cck'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • Drupal CCK field type with complex fAPI child fields

    - by Cliff Smith
    This question is basically a follow-up to this one: http://stackoverflow.com/questions/1640534/drupal-custom-cck-field-with-multiple-child-fields I need to build a CCK field type that stores several pieces of data, and fAPI form elements to accept the input for each piece of data already exist. These elements are built out into multiple HTML form inputs with fAPI #process functions. The problem is that when I try to use these elements in my CCK field, the input from the widget doesn't line up with the database columns specified in hook_field_settings(). The widget returns something like this: Array ( [thumbnail_image] => [imceimage_path] => ... [imceimage_alt] => ... [imceimage_width] => ... [imceimage_height] => ... [user_address] => [address_number] => ... [address_street] => ... [address_city] => ... [address_state] => ... Unless there's a way to specify "sub-columns" in hook_field_settings(), it appears to me that I can't use form element types with sub-elements in CCK fields. I've tried using CCK field validation to pull out the "imce_xxx" values from thumbnail_image and likewise with user_address, but that doesn't get me anywhere. Is it not possible to use form elements with child elements in CCK field definitions? Thanks, Cliff Smith

    Read the article

  • 'add another item' in non-CCK Drupal forms

    - by ceejayoz
    CCK for Drupal has the handy feature of allowing a single CCK field to accept multiple values via a "add another item" button that results in an array of data in the node. I'm wondering if there's any easy way of adapting this for a non-CCK form that I'd be calling by drupal_get_form. I'd rather not have to re-invent the wheel with multi-step form techniques. Anyone done this?

    Read the article

  • Drupal 5: CCK fields in custom content type

    - by Kuroki Kaze
    I have module that implements custom content type via NodeAPI hooks (hook_insert, hook_update etc). I want to add CCK field to this content type and populate it via hook_nodeapi calls like create or update (to show content nodes in Views). Problem is, I cannot access CCK fields for this content type. Sure, it's enabled on "Manage Fields" page, but when I load any node of this type with Devel module, I cannot see field attribute (field_flag) in node object. I can see it under "Dev Render" tab as part of "content" attribute, like $node-content['field_flag']['#value'], but if I assign value to $node-field_flag or $node-content['field_flag']['#value'] and call node_save, CCK fields are not saved. Maybe I must call some other function to save CCK fields? Or what may be wrong with this setup?

    Read the article

  • Drupal CCK Text field not saving.

    - by Mark Milbourne
    Hey Guys, I've been trying to write a CCK Field based on the Text field. But if I create a standard CCK Text field with only 1 value. Then edit a content item for this type, the values are never persisted. When I go back in and edit the same node, the value isn't there. I checked the database and its not in the table for the CCK node. If I use more than one value it works fine. I'm upto date on CCK (6.x-2.6) and CTools (6.x-1.5). Has anyone seen this? and a possible solution?

    Read the article

  • CCK NodeReference - Pass current user id as argument to selection view

    - by Chaulky
    Hi all, I'm trying to create a view to limit the options available to a user for a CCK NodeReference field. I want to pass the current user's ID as an argument to the view that selects the options for the CCK NodeReference field. Basically when the user creates a new item, I only want them to be able to reference a node which they created (not someone else's node). I've got a view set up that accepts a user ID as an argument, but how do I pass the current user's ID to the view from the CCK NodeReference field? Thanks in advance!!!

    Read the article

  • Panels-style UI for arbitrary CCK fields?

    - by ceejayoz
    I have a Drupal content type that has unlimited photo, textbox, and external link CCK fields, but while fields themselves can be reordered via drag-drop (i.e. photo B before photo A), I can't arbitrarily order amongst fields (i.e. photo B, link A, photo A, text A, link B). Panels is awesome, with its drag and drop, and just what I'm looking for interface-wise. Has anyone seen a Panels-style UI for ordering arbitrary collections of disparate CCK fields?

    Read the article

  • Drupal - Grabbing and Looping NID of CCK Nodereference field

    - by GaxZE
    Hello, cant seem to work out how i grab multiple nids of a node reference field. $node-field_name[0]['nid'] picks up the node id of the cck node reference field. however when that cck node reference field has more than one value i get stuck! my php is abit sketchy atm so working with arrays and loops is being quite difficult! here is my code: field_industry as $item) { ? "

    Read the article

  • Where is cck "number of values" data stored?

    - by calebthorne
    I have a cck field that needs to allow a different number of values depending on the role of the currently logged in user. I'd like to find where the "number of values" data is stored for a cck field so that it can be dynamically changed when the node edit form is displayed.

    Read the article

  • checkbox for Drupal CCK

    - by artmania
    Hi friends, I'm new at Drupal. love it so far :) I'm creating a CCK custom content type. I need to make a amenities list in checkbox format. so I made; File Type: Text Widget Type: checkboxes/radiobuttons and Allowed values list: onsite_dining|Onsite Dining meeting_space|Meeting Space business_center|Business Center and it creates Radio Buttons which only 1 selection :( How can I make it Check Box to give ability to select more than 1? Appreciate helps!

    Read the article

  • Drupal: CCK API Docs

    - by Aaron
    Any good CCK API docs out there? I have seen http://api.audean.com/, but can't find what I want there. Basically, I need a function that takes a field name and returns what node type has that field. I wrote my own, but would rather make an API call.

    Read the article

  • How to add a Drupal CCK Custom Field which supports unique identification of multiple values

    - by jtw12
    I need to create a custom field that supports multiple values which can be uniquely identified (beyond the delta field which changes when the values are re-ordered). I have created a module for the field and specified the two database columns that I would like CCK to use (one for the value and one for the ID) but I am not sure where the entry point is for adding in a unique id for each value (probably will just take the id from a sequence).

    Read the article

  • how to access cck checkbox value from views .tpl

    - by romandor
    Subject for advanced views theming: 1) Create CCK integer field "field_checkbox" - Single on/of checkbox Allowed values 0|No 1|Yes 2) In views row-style .tpl <?php print $fields['field_checkbox_value']->content ?> doesn't print any value, why? Other fields output fine. Thank you in advance!

    Read the article

  • Allowed Values list in drupal CCK Fields

    - by GaxZE
    Hello, I'm basically looking to simply print out each of the allowed values in a CCK field.. i know the allowed values are stored inside a text field within the table: 'content_node_field'. the values are then stored within 'global_settings' I'm looking to somehow print out each individual allowed value using a PHP loop. however with all values being stored within one text field.. im finding it hard to print out each value individually.

    Read the article

  • using custom CCK fields in node + Drupal 6

    - by artmania
    Hi friends, I'm new at drupal. I created custom content type with CCK. Added some Phone, Address, Fax fields... Now I'm editing the related node. but in the node it just says print $content How can I use the custom fields I've created? maybe something like print $field_name ? anything like that? appreciate helps!!!!!

    Read the article

  • Stop a custom submit button from firing the form validation on a CCK form

    - by kidrobot
    I've added a submit button inside a fieldgroup on a CCK form using hook_form_alter as follows: function mymodule_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'object_node_form') { $form['group_wikipedia']['search'] = array( '#type' => 'submit', '#value' => t('Search Wikipedia'), '#name' => 'searchwiki', '#submit' => array('mymodule_searchwiki_submit'), ); } } When I press the button, the validation handlers for the full form eg. checks for required fields, run as though I have pressed the 'Submit' button at the end of the form. I thought that changing the #name property from 'op' to 'searchwiki' would prevent this kind of mix-up, but not so. Does anyone know a workaround for this?

    Read the article

  • Drupal CCK 3 Multigroup tables with views

    - by henrijs.seso
    Hi, Each node have CCK-3-dev multigroup with 3 fields. Can I use one of fields as table header? Values of this field are taken from Taxonomy. With a simple recipe example, where food Z and Y are 2 nodes with recipes and each node has multigroup with ingredient name (milk, fish), amount (numbers) and unit (g, kg). Is there a way to create a table like this with views, I want to use views calc to calculate total amount of ingredient needed to prepare multiple recipes: Ingredient A Ingredient B Ingredient C Food Z 200 g 700 g 0 g Food Y 500 g 1000 g 50 g I don't even need units by number, but that would be good too. Anyways, how do I get this?

    Read the article

  • Add HTMl to CCK within Drupal

    - by Romelus96
    Hello im a newbie at using Drupal, and have come across a block in my progress. I have been using CCK to add new content types to my forms. I was wondering if there was any way to add to the form that is generated so that i may contain the elements and also insert visual html code like head rules etc. I have dabbled with the hook_form_alter() and it does not seem to help me in my efforts. Ive been through adjusting tpl.php files and such and have made no progress. Please if there is any one there in the inter-webs who is knowledgeable on this matter your advice would be greatly appreciated. Here is just an example of what I would want to do within the form: 1. Contain field elements within DIV's 2. Add HTML Content into the form

    Read the article

  • Dynamic CCK fields population

    - by boogie
    Hi, How can I create two CCK fields where the latter has values based on the first selection? In my case I have a few programs which can be selected and then projects that are related to programs. I need to have two separate fields for them. Example: Programs: Program1 Program2 Projects: Project1 (related to Program1) Project2 (related to Program2) Project3 (related to Program2) If program "Program1" is selected, then the user should only be able to select "Project1" and in case of "Program2" is selected, the options should be "Project2" or "Project3". I'm using Drupal 6.20 and I've already tried using Conditional Fields and Computed Fields modules, but they don't really solve my problem. Any help is much appreciated!

    Read the article

  • Drupal 6 CCK node form redirect issue

    - by swdv
    Hi, I am having trouble with a multi-step node form for a CCK content type. I set $form_state['redirect'] to a thank you page path, but it does not get redirected upon successful submission. Here is the code following documentation on the Drupal 5.x to 6.x form API at http://drupal.org/node/144132 function rnf_form_alter(&$form, &$form_state, $form_id) { // ... $form['#submit'][] = 'rnf_regret_form_submit'; } function rnf_regret_form_submit($form, &$form_state) { $form_state['redirect'] = 'content/forget-thank-you'; } Any help would be appreciated. Thanks.

    Read the article

  • Unpredictable CCK field name in returned View data

    - by AK
    I'm using views_get_view_result to directly access the data in a view. I've stumbled upon this odd behavior where cck fields are prefixed with the first field name as a query optimization. Explained here. What's bizarre though is that fields are named differently depending on whether I retrieve that data as Anonymous or as Admin. I'm pretty sure all my permissions are set up, and the view itself has no restrictions. What is going on here? This is a big problem since I can't know how to retrieve a field. Here's a dump of the two view results. Notice that node_data_field_game_date_field_game_home_score_value != node_data_field_game_official_field_game_home_score_value. // View as Admin stdClass Object ( [nid] => 3191 [node_data_field_game_date_field_game_date_value] => 2010-03-27T00:00:00 [node_type] => game [node_vid] => 5039 [node_data_field_game_date_field_game_official_value] => 0 [node_node_data_field_game_home_team_title] => TeamA [node_node_data_field_game_home_team_nid] => 3396 [node_data_field_game_date_field_game_home_score_value] => 68 [node_node_data_field_game_visitor_team_title] => TeamB [node_node_data_field_game_visitor_team_nid] => 3442 [node_data_field_game_date_field_game_visitor_score_value] => 118 ) // View as Anonymous stdClass Object ( [nid] => 3191 [node_data_field_game_date_field_game_date_value] => 2010-03-27T00:00:00 [node_type] => game [node_vid] => 5039 [node_data_field_game_official_field_game_official_value] => 0 [node_node_data_field_game_home_team_title] => TeamA [node_node_data_field_game_home_team_nid] => 3396 [node_data_field_game_official_field_game_home_score_value] => 68 [node_node_data_field_game_visitor_team_title] => TeamB [node_node_data_field_game_visitor_team_nid] => 3442 [node_data_field_game_official_field_game_visitor_score_value] => 118 )

    Read the article

  • Link between CCK field and view

    - by JTB
    I want to use a view to select nodes in a content type field. This view must receive an argument that is another field of the content type. Can someone explain me how to pass the argument from the field to the view? Excuse my poor english

    Read the article

1 2 3 4 5 6  | Next Page >