I have created a registration form using webform, and it has been in use for a couple months. I now need to turn off some of the fields. The registration form is still needed, but without those fields.

Is there a way I can disable components from appearing on the form?

I do not want to delete these, because I want to keep the data from the already submitted submissions.

I know I can hide the fields using CSS, but I wanted to know if webform could actually disable the fields from being used.

Comments

quicksketch’s picture

No not currently. You could theme out the fields though, which would make it very difficult to submit (but not impossible). Or you can use hook_form_alter() and remove the fields at the Form API level, which would truly disallow any new submissions on those fields.

quicksketch’s picture

Status: Active » Closed (fixed)
arlanda’s picture

+1 for this feature.

RKS’s picture

Title: disable components from appearing on the form » Disable components from appearing on the form
Category: support » feature
Priority: Normal » Minor
Status: Closed (fixed) » Active

If I could, I would like to reopen this as a feature request. I do find myself needing this in a lot of forms where I can to temporarily disable some fields and then add them back again at a later date.

Sometimes it's simply ad jargon that appears only during sales etc. It would be a nice feature to be able to just disable it and then re-enable it when I need it again.

danchadwick’s picture

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

Not enough demand to justify the UI.

druliner’s picture

I could use this as well. :D

As for UI one could simply use the "Display on" dropdown:

--- Display on: ---
form only
viewed submissions only
both form and viewed submissions
none <--- add this