This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

iFrme form validation

Hi there,

Could someone please guide me on how to validate forms within an iframe? Specifically, I am working with forms such as:

"entity-browser-browse-files-modal-form"
"entity-browser-browse-files-form"

function hook_form_alter(&$form, &$form_state, $form_id) {
 // Add Custom validation
}

I would appreciate any advice or examples on how to properly handle form validation inside an iframe context.

Thank you in advance for your help!

Best way to transition roles and permissions from development to production

Hello all!  While developing our Drupal site, we have set up some additional custom roles and assigned permissions to these roles.  As developers, we configure these incrementally and test on our development environment. Once this is tested and working, what is the best way to transfer all these custom roles and assigned permissions to test and production environments, such that the site administrators do not need to go into the Drupal administration page manually to re-configure and assign all these custom roles and assigned permissions? Should I build some custom module to handle this?

Problem with $form_state->setUserInput()

I am building a custom multi-step form with back/forward buttons. 

When a user clicks 'next' it saves the current steps values in form storage like this:
 

$storage['values'][$this->step] = $form_state->getValues();
$form_state->setStorage($storage);

When the user clicks 'Back', I am pulling the values out of storage and setting them to $form_state->setUserInput(); like this:
 

Send mail with symfonymailer default transport

I am developping a custom module  that sends notifications.

The sending  service is more or less as follows

Drupal 11 Ajax confirm_form formsubmit() not run

I am creating a form that uses an ajax modal confirm form. The confirm form is displayed, but pressing the "Confirm" button just disappears the panel, but the submitform() never runs. If I call the confirm form separately without ajax OpenModalDialog, it works, formsubmit() runs. How could this be implemented?

original form delete button:

Drupal 11 form infinity scroll / form state problem

I have my own form that shows a list of products. It can be scrolled, but I would like a "Load More" button. My problem is that I can't store the current position, because in the ajax callback I can't use the $form_state->set, get functions. How can I increase the position in the ajax callback function called when the "load more" button is pressed?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions