7

Using multiple field widgets for the same field in Drupal

 2 years ago
source link: https://www.codesd.com/item/using-multiple-field-widgets-for-the-same-field-in-drupal.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Using multiple field widgets for the same field in Drupal

advertisements

I would like to be able to use multiple form field widgets for the same field and to be able to switch it based on session data from the user. But I am not really sure how to accomplish this. This is for Drupal 6. Any ideas on how to accomplish this?


You might be able to accomplish this with one of the field access modules but to do it properly you'd probably need to create a custom widget. Your widgets can return existing widgets by calling their handles, so your widget would more or less be a wrapper that returns the correct widget call.

this tutorial gives a pretty good overview of widget creation in Drupal 6.

Related Articles

Using multiple ssh keys for the same host, without using an alias

I have two bitbucket accounts and ssh keys to match. I've seen many solutions to manage using multiple keys on the same host through aliasing, but unfortunately, I need my git references to be common. The reason I need them to be common is because I'

Using multiple language views for the same controller in CodeIgniter

How do I use multiple language views in a controller according to the url parameter? I have a english version of a website in CodeIgniter.I want to make Greek and Arabic version of this website without changing the models and controllers.Anybody know

Multiple click events for the same item?

Is it possible to have multiple click events for the same element? I have tried to simply have it like so: $('#templates').click(function(e) { do something.. }); $('#templates').click(function(e) { do something else also.. }); Yet only the second eve

Multiple signal handlers for the same signal, for example SIGALRM

This question already has an answer here: Is it valid to have multiple signal handlers for same signal? 5 answers I have a sample program which triggers SIGALRM every second. Following is my code. #include <signal.h> #include <stdio.h> #includ

CakePHP - Multiple paged tables for the same model, on the same page

I get the impression this is not supported by Cake core yet, but has anyone managed to write their own code to do so? Is it possible with Ajax? I don't mind having all my tables Ajax sortable if this is the only way to do it. Yes, I am aware of the l

Can you have multiple enum values ​​for the same integer?

This question already has an answer here: Non-unique enum values 6 answers In .NET can you have multiple enum values for the same integer? eg. public enum PersonGender { Unknown = 0, Male = 1, Female = 2, Intersex = 3, Indeterminate = 3, NonStated =

How to add multiple ad files for the same username in gitolite?

I'm new at using gitolite and have been doing some tests and there is one thing I don't understand. When a user generates its key (say, "pablo") the id_rsa.pub needs to be renamed to "pablo.pub" because it says in the file content pabl

Define multiple IE10 cookies for the same domain?

I'm trying to install a cookie file from code on a client side machine. I can tell using the lovely IECookiesView tool, or the less lovely Notepad, that the cookie file contains multiple cookies of different names for the same domain. However if I tr

ASP.NET - multiple worker threads for the same client

I understand that ASP.NET serves requests using worker threads. Therefore client A and client B can make requests and the requests are dealt with concurrently. Can a client make multiple requests concurrently. Please see the code below: Imports Syste

Multiple TFS server for the same project

For the same project I want to use 2 TFS server, because I have 2 groups of developers and they can only access their own TFS and I can access both. This is very easy to do with git. Take a look at my .git/config file. This project uses both github a

JSF2 - Stop multiple validation errors for the same field (ie there can only be one)

Given this snippet in a facelet: <h:messages layout="table"></h:messages> <br /><br /> First Name: <h:inputText styleClass="inputText" id="firstName" validatorMessage="#{msg['error.userEdit.fir

Have multiple calls waiting for the same promise in angular

I have multiple controllers on a page that use the same service, for the sake of example we will call the service USER. The first time the USER.getUser() is called it does an $http request to GET data on the user. After the call is completed it store

Use of 2 ways for the same action

Question 1: What is the correct way to build a Use Case (or more than one) with 2 ways to do the same action? For example: I have a 3 screens in an iOS app: 1. A map view, which can be "long pressed" and has a camera button. 2. A camera view, wh

How can I use multiple GLSurfaceView components in the same layout?

I'm writing an Information Visualization API for Android and ran into a problem trying to place two units of a custom GLSurfaceView into a Layout. The Custom GLSurfaceView at this point is simply an extension of the GLSurfaceView to eliminate possibl

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK