University of Oregon

Concatenate fields in a Fillable form

Recently someone referenced an old blog post: use data from one field to populate other fields in an acrobat fill-in forms and asked me how to concatenate multiple field values into one.

So I put together a sample pdf.


Drupal6 VBO – ‘Open Links’ header link option updated

Last month I posted the code I used to add a link to header that opens all the edit links in a view. Developments » Drupal6 VBO – ‘Open Edit Links’ link added to header.
This month I had a view with a workflow link and I wanted to add a link to open those links as well.

So I updated the function to take two variables: the descriptive name of the link type (descName) and the jQuery css selector (cssSelector).
So the original ‘Edit’ link had to be updated from



openEditLinks('Edit','.views-field-edit-node a');

But now it can be called side by side with the workflow link option:


. Like so:

<a href="#" title="Click to open ALL edit links or highlight a group of edit links to limit the number of links that open.">Open Edit Links</a> |
<a href="#" title="Click to open ALL Workflow links or highlight a group of workflow links to limit the number of links that open.">Open Workflow Links</a>


Drupal6 VBO – 'Open Edit Links' link added to header

Update 4-13-11: Developments » Drupal6 VBO – ‘Open Links’ header link option updated.

I took the bookmarklet that opens all the ‘Edit’ links on the Views Bulk Operations content management page and updated it to work in the header of the view.

Here are some screenshots of what it looks like and the code I placed in the header of the view.

Drupal6 VBO Open all Edit Links Bookmarklet

I needed to edit some custom content in a large number of nodes and while Views Bulk Operations (VBO) allowed me to filter down to those nodes there isn’t a custom operation to edit text in custom fields. Not that I would expect there to be one.
So I wanted to open all the edit links in one fell swoop. I have a bookmarklet: ‘Open Selected Links’ which would work OK if the edit link was the only link for each node but it’s not. So I thought Why don’t I update the script to use just the edit links.
And so I did.
The working script is all JS with one line of jQuery.
The line in question previously set the available links using

dl = document.links;

and now uses:

dl = $('#views-bulk-operations-form--1 .views-field-edit-node a');

Which is a collection of all the edit links on the page.

I could probably keep in the old default and prompt the user to use just the edit links but quick and dirty is the name of the game right now.

New bookmarklet: Alphabetize

Here’s a time saver:
Check selected / all boxes
One click and you can check or uncheck all the checkboxes on the page. That is unless you have a selection of checkboxes highlighted; then it only operates on your selection. It works across frames too.

It’s based on the check all boxes bookmarklet which is a number of years old now. I’ve never needed to restrict my checking to a selection until today when setting permissions in drupal.

Added a new form to facilitate creating new user accounts in vpfa-searches

We have a Drupal 5 site we use for users to collaborate on job searches and adding users is a bit of a chore. When I was asked to add 10 users today I wasn’t looking forward to it. Redundant, monotonous and repetitive; the trifecta that is my arch-nemesis.

So I created a javascript that populates the form from an email address and creates a random password. (more…)

Use data from one field to populate other fields in an acrobat fill-in forms

Update 10-16-2014; added a sample where two field values concatenates into one with ‘and’ as a separator.

I was just asked how to use data from one field to populate other fields in an acrobat fill-in form.
Turns out you just need to write a little javascript and add it to the action tab of the initial field in your form.

To begin let’s assume we’re using Acrobat Pro 8 or 9. If you use Live Cycle Designer for your form wizard, you’ll want to edit the form in Acrobat to follow these steps exactly.

Create a wordcloud from any page

On the ODT web site we’d like to generate word clouds for our local and linked content. So I went looking for a simple javascript word cloud generator. I found a project on Clusterfy that created a jquery bookmarklet to do that on any page:

Here’s the example: Generate Word Cloud

Note: I’ve also created a version that highlights the words on the page when you click them. Create a wordcloud from any page with search function

I made several modifications: (more…)

Inserting a custom menu group into a drupal suckerfish menu

We have a huge anchored document with and equally huge TOC. There’s also a traditional drupal menu on that page.
My goal was to get the inline menu into the drupal menu.

Div swapping didn’t work ie: div1.innerHTML = div2.innerHTML. The menu showed up but the open / close functionality was lost.

So moving the node was the key.

		$(document).ready(function() {
			document.getElementById('dhtml_menu-254').parentNode.className='first dhtml-menu collapsed start-collapsed';

		//create function, it expects 2 values.
		function insertAfter(newElement,targetElement) {
			//target is what you want it to go after. Look for this elements parent.
			var parent = targetElement.parentNode;
			//if the parents lastchild is the targetElement...
			if(parent.lastchild == targetElement) {
				//add the newElement after the target element.
			} else {
				// else the target has siblings, insert the new element between the target and it's next sibling.
				parent.insertBefore(newElement, targetElement.nextSibling);