How to unpublish or disable webform components without code for d7?

I've seen answers to do this programmatically, but I'm looking for a simple "unpublish" or "disable" field from back end GUI, is that possible?

1 Answer 1


Webform itself offers no UI-based method for disabling/un-publishing components.

Unless you can find something in contrib that can help (or perhaps convince the developer of webform to add it as a feature), you'll need custom code to achieve it.

As an example you may be able to configure Webform Conditional to disable fields unconditionally, or based on a contrived condition, to simulate the effect. But it wasn't necessarily built for the purpose you need.

  • Unbelievable that a 2017 CMS can't do this...! May 17, 2017 at 9:03
  • It's a module, not the CMS as such. Remember it's only a couple of lines of code to do this for a specific use-case, but considerably more work to make a generic UI-based solution. If I was the Webform module maintainer and I had 272 issues open, 127 of them bug reports, I reckon I wouldn't bother building this feature either. If it's anything more than a niche requirement, you tend to find a contrib solution. I guess in this case it's a relatively niche requirement
    – Clive
    May 17, 2017 at 9:10
  • 1
    I wouldn't call it niche requirement, all content should have a publish, unpublish and delete option, that's just commons sense, isn't it? May 17, 2017 at 9:31
  • 1
    Content? Absolutely, and it does - all webforms are nodes, and can be published/un-published as you'd expect. The components in a Webform, like the fields in core, are configuration, not content. Being able to enable/disable them arbitrarily, rather than just add or remove, makes less sense unless you have a niche requirement (in my opinion)
    – Clive
    May 17, 2017 at 9:37

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.