Bootstrap 7.x-3.0
Both comment form buttons are disabled until text is provided for the main comment form.
Screen shot 1: shows that both buttons are disabled even though there is text in the reply form.
Screen shot 2: once text is added to the main comment form, all buttons are enabled.
Here is the rendered html for the submit button (for the reply form) when it's disabled:
<button class="btn-sm btn-primary btn btn-success form-submit form-disabled" id="edit-submit--2" name="op" value="Add Comment" type="submit" disabled="disabled">
Add Comment
</button>
A similar issue with the statuses module: https://www.drupal.org/node/2086739
My quick fix was simply setting the "disabled" property for the buttons to false :
$( ".comment-form-region form button" ).prop('disabled', false);
$( ".comment-display-region form button" ).prop('disabled', false);
It would be great if there was a cleaner fix within the module itself.
Comment | File | Size | Author |
---|---|---|---|
submit_btn_disabled_2.PNG | 90.2 KB | ydahi | |
submit_btn_disabled.PNG | 70.74 KB | ydahi |
Comments
Comment #1
jweirather CreditAttribution: jweirather commentedI followed the solution "patch" in the linked/related issue:
https://www.drupal.org/node/2086739#comment-8476299
Our use case pointed us toward a PHP/module-based solution instead of JS.
Just wanted to offer an update. I'll report back with any issues.
Thanks for providing the JS alternative!