This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

menu per role

Hi,
I've added the patch and don't have any errors on my page.
The problem is that once i've done this, the menu module disappears from my Site building section inside my administrator interface?

The other thing that i don't understand is that, when i give a menu item to a role and then log in
with the user associated with this role i have access to the whole menu module.

Could anyone help please.

baz

How to only attach OR create content type in node relativity, not both?!

The link block show both 'attach' and 'create new' nodes options. But what if you want only the 'attach' options to shown for one content type and 'create new' option for another content type? Any snippets around?

Example:
Mother (parent) and Daughter (children) setup using node relativity. From the mother node you can create a daughter and from the duagther you'll see the link to who's the mother. That's ok!

Module/Block selection help

We have the following site

www.donortec.com.au

We are looking to enhance the site so that user can becom more aware of important information.

We have installed a panels so that we can display more content on the frontpage, but it isn't enough.

We have a whole bunch of 1 sentance/prase's we would like to be displayed in a rotating flash banner. Which would be called "tips" or "important information"

How to submit using hook_alter_form for a node

I've been searching everywhere and cannot find any information on how to submit & pick up the data using the form_alter hook.

Modify form required values using jQuery

I am working on an ecommerce checkout form. On the Shipping/Billing page, I have a "Same as billing" checkbox.

What I'd like to do is if the checkbox is not set, change the form so all of the shipping fields are required and have the red asterix, validate, etc.

This is what I have so far

1) My form element in a form function:

 $form['address']['shippingSame'] = array('#id' => 'sameship-box', '#attributes' => array('onclick' => 'mod_class_fields(this.value);'), '#type' => 'checkbox', '#title' => t('Same as billing address.'), '#weight'=>-40);

2) The Javascript (borrowed from here http://www.ubercart.org/drupal_module_and_jquery_guides/code_explanation)
I am not strong in javascript at all - how should I be communicating with FAPI through jQuery?

<?php

drupal_add_js('$(document).ready(function(){
// Ready code here.
if ($("#class-box").val() > 0)
mod_class_fields($("#sameship-box").val());
} );

//mod fields
function mod_class_fields(class_id) {
if (class_id == 1) {
//$("#billing-fields").hide("slow").empty();

$form['address']['shipping']['firstname']['#required'] = TRUE;
$form['address']['shipping']['lastname']['#required'] = TRUE;
//etc
} else {

$form['address']['shipping']['firstname']['#required'] = FALSE;
$form['address']['shipping']['lastname']['#required'] = FALSE;
//etc

Modify form required values using jQuery

I am working on an ecommerce checkout form. On the Shipping/Billing page, I have a "Same as billing" checkbox.

What I'd like to do is if the checkbox is not set, change the form so all of the shipping fields are required and have the red asterix, validate, etc.

This is what I have so far

1) My form element in a form function:

 $form['address']['shippingSame'] = array('#id' => 'sameship-box', '#attributes' => array('onclick' => 'mod_class_fields(this.value);'), '#type' => 'checkbox', '#title' => t('Same as billing address.'), '#weight'=>-40);

2) The Javascript (borrowed from here http://www.ubercart.org/drupal_module_and_jquery_guides/code_explanation)
I am not strong in javascript at all - how should I be communicating with FAPI through jQuery?

<?php

drupal_add_js('$(document).ready(function(){
// Ready code here.
if ($("#class-box").val() > 0)
mod_class_fields($("#sameship-box").val());
} );

//mod fields
function mod_class_fields(class_id) {
if (class_id == 1) {
//$("#billing-fields").hide("slow").empty();

$form['address']['shipping']['firstname']['#required'] = TRUE;
$form['address']['shipping']['lastname']['#required'] = TRUE;
//etc
} else {

$form['address']['shipping']['firstname']['#required'] = FALSE;
$form['address']['shipping']['lastname']['#required'] = FALSE;
//etc

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions