0

I need to create custom blocks for every new webform. When User will create a webform, module should create a custom webform block.E.G. 'webform-1' becomes 'webform-1-block'. The resulting block must be of type 'webform_block' and reference the newly created webform.

How should I achieve this functionality? Any reference?

Thanks in advance.

3
  • Why do you need custom block? .By Default, Webform block will be created once the webform is created. Check in block layout -> place block of any region. You can find the webform block Commented Dec 5, 2017 at 9:24
  • I need to give only that webform region blocks to access the users. Right now, they can access all the blocks and regions under structure/block. So, I am thinking like create custom block and place into the specific region via a module. So the user can directly access via the page. Maybe I am thinking very complicated. Is any alternate solution to place webform block directly save into specific region?
    – latikas
    Commented Dec 5, 2017 at 9:34
  • 1
    See drupal.stackexchange.com/questions/251143/… for how to place a block. In your case the plugin is webform_block and you have to provide the webform_id of the newly created webform in settings.
    – 4uk4
    Commented Dec 5, 2017 at 16:27

0

Your Answer

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

Browse other questions tagged or ask your own question.