O'Reilly logo

Drupal 7 Webform Cookbook by Douglas Vernon Denny

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Cloning components

For the sake of uniformity in the presentation of our form we will clone the First name component to create a Last name component with similar settings.

How to do it...

Cloning is the act of making a copy of something. Let's take a look at how we may copy existing components to save ourselves some work:

  1. On the Form components overview page, click on Clone under Operations adjacent to First name.
  2. On the new component's settings page we change the Label to Last name and change the field key to last_name.
  3. Finally, we can click on Save component.

How it works...

Cloning is a useful time saver when we need to have more than one component of a given type with similar settings.

There's more...

The clone operation makes a carbon copy of an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required