Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
No, not through the UI. You can hack it by updating the database table for "webform_components", but converting from one to the other isn't possible for end-users.
similar question: this one about swapping a textfield for a textarea
if i create a new textfield and delete an existing textarea through the UI, would the underlying database by default know what to do with that, or is there anything special i'd have to account for
what i'm after is removing the more verbose field in favor of a concise one, but i'm not sure if there are gotchas under the hood
excellent, thanks; that may be fine for me because all the data in question has already been converted to customer leads in a different application; purpose is to constrain input on future submissions
Textarea and textfield could be the same component type, but with a different display setting, much like how a select options component can be rendered as a select element or as radio buttons/checkboxes.
@Liam Morland - Are you suggesting something along the lines of an option checkbox for 'Multi-line textfield' on the textfield component edit page (and removing the textarea component)?
Hey Liam, I think having them separate is fine, though maybe together would have some benefit. I'm interested in making this work for Form Builder, which has the same problem not only with textfields and textareas, but with checkboxes/radios/select lists (since those fields are all separate items in Form Builder).
Yes, it sounds like a similar problem. Webform components separate the kind of information from what HTML controls are used to collect it. Having textfields and textareas are separate Webform controls is less like this than the select lists.
Comments
Comment #1
quicksketchNo, not through the UI. You can hack it by updating the database table for "webform_components", but converting from one to the other isn't possible for end-users.
Comment #2
Joe.Cafiero commentedsimilar question: this one about swapping a textfield for a textarea
if i create a new textfield and delete an existing textarea through the UI, would the underlying database by default know what to do with that, or is there anything special i'd have to account for
what i'm after is removing the more verbose field in favor of a concise one, but i'm not sure if there are gotchas under the hood
Comment #3
quicksketchIf you remove a field through the UI, all the data in that component will be deleted from the database immediately.
Comment #4
Joe.Cafiero commentedexcellent, thanks; that may be fine for me because all the data in question has already been converted to customer leads in a different application; purpose is to constrain input on future submissions
Comment #5
quicksketchI'm moving this to a feature request, but I have no idea how we would go about adding this functionality.
Comment #6
liam morlandComment #7
liam morlandTextarea and textfield could be the same component type, but with a different display setting, much like how a select options component can be rendered as a select element or as radio buttons/checkboxes.
Comment #8
vernond commented@Liam Morland - Are you suggesting something along the lines of an option checkbox for 'Multi-line textfield' on the textfield component edit page (and removing the textarea component)?
Comment #9
liam morlandYes.
Comment #10
liam morland@quicksketch What do you think of the idea in #7?
Comment #11
quicksketchHey Liam, I think having them separate is fine, though maybe together would have some benefit. I'm interested in making this work for Form Builder, which has the same problem not only with textfields and textareas, but with checkboxes/radios/select lists (since those fields are all separate items in Form Builder).
Comment #12
liam morlandYes, it sounds like a similar problem. Webform components separate the kind of information from what HTML controls are used to collect it. Having textfields and textareas are separate Webform controls is less like this than the select lists.
Comment #13
danchadwick commentedI'm closing this as won't fix, but if someone is interested in making this work (including form builder), then please re-open with a patch.