Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8152533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:44:29+00:00 2026-06-06T15:44:29+00:00

We have the form from where we need to access the values through a

  • 0

We have the form from where we need to access the values through a php code written.
But $_POST is not working in drupal.

We need to know how to access all the submit values in php, please can anyone help us ?…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:44:30+00:00Added an answer on June 6, 2026 at 3:44 pm

    Is this a form rendered in Drupal and also read from Drupal? Then it’s easy with the FAPI. You just need to add a submit callback to the form.

    If it’s your own module’s form, just create another function with _submit suffix, like mymodule_form_function_submit. If it’s someone else’s form you will need to implement hook_form_alter and have it add your submit callback like so:

    function mymodule_form_alter(&$form, &$form_state, $form_id) {
      if ($form_id == 'the_form') {
        $form['#submit'][] = 'mymodule_the_form_submit';
      }
    }
    

    Then simply implement the callback function.

    function mymodule_the_form_submit($form, $form_state) {
      die('My name is ' . $form_state['values']['name']);
    }
    

    Using Drupal’s built in Form API has the added benefit of separate validation from business logic. This means you can also add a validate callback, just like you addeed a submit one. If the validate callback calls form_set_error() then your submit callback won’t even get called and so it can safely rely on having proper data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form and I need to add some data from database before
I have a form builder class which inherits from AbstractType and I need to
I have this java servlet that grabs information from a form, I need to
I have form and I want to send values from it with ajax to
I am attempting to have mechanize select a form from a page, but the
I need to access a value within a form and an iframe from the
I have a form and from this I call dialogPrintDiet.ShowDialog() which launchs my dialog.
I have linked a form from campaign monitor to a mobile site and I
I have a Main form.I want to launch another form from it and launch
I have a form like so: from django import forms from django.contrib.auth.models import User

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.