Conditional fields not working in node form

DjebbZ - July 5, 2009 - 08:56
Project:Popups API (Ajax Dialogs)
Version:6.x-1.3
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi guys

I'm using the hook_popups to create custom links to a node/add form, as such :

<?php
function popups_addon_popups() {
   
$rules = array(
       
'node/19' => array(
           
'span.btn a' => array(
               
'additionalJavascript' => array(
                   
'misc/collapse.js',
                   
'sites/all/modules/conditional_fields/conditional_fields.js'
               
),
               
'noUpdate' => true
           
)
        )   
    );
   
    return
$rules;
}
//function popups_addon_popups()
?>

I have 2 problems here :

  • adding collapse.js works, not conditional_fields.js
  • I want to replace 'node/19' by node/[content-type], because the link only appear on some content types. Path aliases don't work, and I couldn't find a function in the API the returns the system path from the path alias (only the opposite). Am I mistaking ? Is there a simple way I didn't see ?

For conditional_fields.js, I don't know if it's a bug, because I read in popups.module that all javascript inserts don't work, so I'm not marking this issue as a bug report.

#1

DjebbZ - July 5, 2009 - 09:04

Another thing : when the node form popup is loaded, the mouse pointer is the small UNIX swatch, like if some process was happening in the background (I'm using Firefox on a Mac). When I comment the call to conditional_fields.js, it doesn't happen.
- Drupal 6.12

 
 

Drupal is a registered trademark of Dries Buytaert.