Is there a way to convert an existing textfield on a webform to a textarea?

Comments

quicksketch’s picture

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.

Joe.Cafiero’s picture

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

quicksketch’s picture

If you remove a field through the UI, all the data in that component will be deleted from the database immediately.

Joe.Cafiero’s picture

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

quicksketch’s picture

Title: can you convert a textfield to a textarea » Convert a textfield to a textarea
Version: 6.x-2.10 » 6.x-3.x-dev
Category: support » feature

I'm moving this to a feature request, but I have no idea how we would go about adding this functionality.

liam morland’s picture

Version: 6.x-3.x-dev » 7.x-4.x-dev
liam morland’s picture

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.

vernond’s picture

@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)?

liam morland’s picture

Yes.

liam morland’s picture

@quicksketch What do you think of the idea in #7?

quicksketch’s picture

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).

liam morland’s picture

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.

danchadwick’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)
Issue tags: -convert

I'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.