Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a form which has a conditional element on a select widget that shows one of three help statements. When the form is first rendered all three statements are hidden. This works properly when viewed as a page or a block, but when the form is rendered with php, none of the three statements is hidden.
I use the following php code to add a webform inline via php:
<?php
$block = module_invoke('webform', 'block_view', 'client-block-34');
print render($block['content']);
?>
Is there an alternate php call that I can use so that the conditionals are rendered properly? thanks
Comments
Comment #1
DanChadwick CreditAttribution: DanChadwick commentedAs the large STOP notice says when you post a new issue, we don't supply custom programming support in the webform issue queue. There just aren't resources.
I would look to see why the block module works and your code doesn't. One possibility is that it is too late in the page generation process and the javascript has already been output.