1283 Posts
Bucklash
8 years ago
0
Topic

Hi Sebloders

 

Concept

Create a category and at same time create a user group with the same title.

 

My Solution

I used jQuery on my cat_title field to dynamically duplicate 'value' on to user_group_title_backend:

/* The field I wish to retrieve the data from */
$( "#cat_title" ).keyup(function(e) {
    /* Storing the value as a variable */
    $catTitleValue = $(this).val();
    /* The field I wish to set with the variable */
    $("#user_group_title_backend").val($catTitleValue); 
    /* funky :) */
}); 

 

Options

1

I could have added a module to the page and using SD CCK Live plugin retrieved the value.

 - For this I would need two submit buttons, or make a button submit both forms at the same time (seems fair enough!)

 

2

Have usergroup form embedded in category form and retrieve the value dynamically.

 - SD CCK Live only works when it is NOT in the main content item, ie it works when it is in a module placed on same page as content, 

 - SEBLOD Form & List Pack (2 plug-ins) form' field functions only in content views, not form views.

Other Solutions

I know there are other ways of achieving this, maybe with the plugin BeforeStore (Code Pack (5 plug-ins).

Any suggestions on how I could/should do this would be greatly appreciated

 

Bucklash

Get a Book for SEBLOD