$form['value'] = array(
        '#type' => 'textfield',
        '#title' => t('Webservice URL'),
        '#default_value' => $component['value'],
        '#description' => t('The default value of the field.'),
        '#size' => 60,
        '#maxlength' => 1024,
        '#weight' => 0,

I want to make a second textfield in my component where I can specify the second part of my Webservice URL and then concatenate them in my rendering. How can I add a second textfield to my webform_edit?

  • What is this form for? Do you need to save the concatenated url or only render it? Oct 29, 2013 at 10:52

3 Answers 3


For one of my projects I spend almost whole week trying to find similar functionality it turns out that you cannot render the input of two fields as one entry from webform result due to the fact that webform creates separate database entry for every field. I solve my problem by just creating multiple fields value_1 value_2 and so on and when exporting result concatenate them in Excell (stupid I know :-) and does not work for your case) . There is module Webform Add More but it only use the same aproach but hides the extra fields and shows them when needed. If you are willing to switch from webform you can try EntityForms this way you can use regular Drupal fields to get entered values and embedding Entityforms on Nodes using Entity Reference


You can use Webform Structured Text module to achieve this


You should use Paragraphs module. This is just awesome. Found a helpful article: https://www.gyanblog.com/gyan/drupal-how-add-multiple-fields-single-button/

Paragraphs module is so powerful, it has lot of other use cases as well. The best part is, no coding required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.