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.
add bellow code in * Callback function for commerce_userpoints_discount_pane_checkout_form()
for display errors in form with ajax
function commerce_userpoints_discount_use_credit_callback_input($form, $form_state) {
...
$commands[] = ajax_command_html('#example-cart-contents-wrapper', render($cart_contents_view));
+ $commands[] = ajax_command_remove('div.messages');
+ $commands[] = ajax_command_before('#main-content', theme('status_messages'));
that is ok
Comment | File | Size | Author |
---|---|---|---|
#2 | screenshot20161016_184939530.png | 267.52 KB | zenimagine |
#2 | screenshot20161016_184927122.png | 278.64 KB | zenimagine |
Comments
Comment #0.0
m2jalali CreditAttribution: m2jalali commentedexactly code
Comment #1
zenimagine CreditAttribution: zenimagine commentedThank you, your solution works for me.
How to display the messages in the user panel points ?
instead of displaying the top of the page.
Comment #2
zenimagine CreditAttribution: zenimagine commentedThe messages should be displayed as for commerce coupon :