Múltiples Eventos Submit en un solo formulario Drupal 7

En el siguiente articulo vamos a ver de manera sencilla como llamar varios métodos submit para varios botones que ejecutaran de manera sencilla.

Ejemplo

Como podemos ver una caja de texto con dos botones, en este caso lo importante es especificar la propiedad ‘#submit’ de la siguiente manera para su correcto funcionamiento.

$form['Text'] = array(

  '#type' => 'textfield',

  '#size' => 40,

  '#maxlength' => 40,

);
$form['submit_1'] = array(

  '#type' => 'submit',

  '#name' => 'submit',

  '#value' =>  t('Submit 1'),

  '#attributes' => array(

    'role' => array('button'),

   'class' => array('btn btn-success'),

  ),

  '#submit' => array('send_submit'),

);
$form['submit_2'] = array(

  '#type' => 'submit',

  '#name' => 'submit_2',

  '#value' =>  t('Submit 2'),

  '#attributes' => array(

    'role' => array('button'),

   'class' => array('btn btn-success'),

  ),

  '#submit' => array('send_all_submit'),

);

Importante
Crear previamente los eventos submit en su archivo php.

Otras características de los formularios de drupal en:  https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/7.x

 


20 comentarios

vvjlorg · diciembre 3, 2025 a las 8:05 pm

Yo, just checked out vvjlorg! Not gonna lie, things seem pretty solid. Layout’s clean, and it’s easy to navigate. Seems like a decent spot if you’re looking for something new. Check it out for yourself: vvjlorg

50betlogin · diciembre 19, 2025 a las 6:59 pm

Signed up for 50betlogin. The login process was straightforward, and the website is easy to navigate. Time to put my bets in. You should check them out here 50betlogin

rushbetbono · diciembre 19, 2025 a las 10:09 pm

Rushbetbono, manito, es la onda para encontrar esos bonos que te dan un empujoncito extra. Échale un ojo y aprovecha las promos! Dale click aquí rushbetbono.

peryaplusapk · agosto 23, 2026 a las 8:38 pm

Finally found an APK that actually works without any lag. The interface is very user friendly and the payouts are legit. Love using peryaplusapk on my phone

jilionelogin · septiembre 6, 2026 a las 1:08 am

I’ve tried a few platforms recently but this one is surprisingly smooth. The login process is quick and I didn’t encounter any lags. Definitely a solid choice for local players. Check out jilionelogin for a great experience.

bjbajiapplogin · septiembre 9, 2026 a las 7:12 am

Logging in is a breeze and I never face any glitches. It is the most stable app I have used so far. Just head over to bjbajiapplogin.

ritz99 · septiembre 19, 2026 a las 11:33 am

[2603]ritz99 Login & Register | Trusted Online Slot Malaysia,ritz99 offers a seamless login app and easy register account process. Enjoy a trusted online slot Malaysia experience with e-wallet casino deposit. Join now. visit: ritz99

bdzb777 · septiembre 26, 2026 a las 4:41 am

Really loving the variety of options available here. It keeps things exciting and I never get bored. Cheers to the team at bdzb777 for this awesome experience.

phplusloginph · octubre 2, 2026 a las 3:51 pm

Love how easy it is to manage my funds on this site. The security feels solid and the login process is very secure. Highly suggest phplusloginph for a safe gaming experience.

bb44ap · octubre 10, 2026 a las 2:11 pm

Honestly, I’ve tried a few sites, but this one stands out for its fast payouts. No long waits or confusing steps. Really appreciate the efficiency here. Highly recommend bb44ap to all my friends!

joya9combdlogin · octubre 13, 2026 a las 1:48 pm

I’ve been looking for a reliable spot to play and this one really delivers. The interface is smooth and the payouts are quick. Definitely check out joya9combdlogin if you want a hassle-free experience.

nbajjelogin · octubre 23, 2026 a las 8:44 pm

Perfect for sports fans. The live updates are spot on and the betting options are endless. I always use nbajjelogin for my weekly picks.

bdg7777 · octubre 28, 2026 a las 11:20 am

Solid platform with a fair gaming environment. I appreciate the transparency and the way they handle the promotions. bdg7777 is a winner in my book.

plataforma7brwin · octubre 28, 2026 a las 4:48 pm

I’ve been trying a few sites lately and this one really stands out. The interface is smooth and the payouts are fast. Definitely recommend checking out plataforma7brwin if you want a reliable spot.

puasbetslotlogin · octubre 29, 2026 a las 9:46 am

Finally found a place where the slots actually hit. The login process is quick and everything just works. Give puasbetslotlogin a go if you love slots.

zoom188login · octubre 30, 2026 a las 2:46 pm

Logging in is super quick and the account management is very straightforward. Great service overall at zoom188login.

slot977 · noviembre 7, 2026 a las 5:33 am

Love the layout and the overall vibe of the site. It feels very user friendly even for beginners. I’m really enjoying my time on slot977.

indwin7download · noviembre 7, 2026 a las 10:52 pm

The download was super fast and the app installation was a breeze. It runs perfectly on my phone. Thanks for the easy setup indwin7download.

bdab777 · noviembre 8, 2026 a las 11:17 pm

Really impressed with the loading speed and the overall vibe of the site. It makes gaming so much more enjoyable. Give bdab777 a shot if you want a reliable site.

vnhm88net · noviembre 10, 2026 a las 11:11 pm

Really enjoying the bonuses they offer. It gives me a much better chance to win big. Visit vnhm88net now

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *