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

  • SEARCH
  • Home
  • 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 6245679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:32:55+00:00 2026-05-24T12:32:55+00:00

I have to devellop an internal web based application with codeigniter and I need

  • 0

I have to devellop an internal web based application with codeigniter and I need to chain different forms (generate upon data choosen with previous form).
Right now, I tried to use form validation in the same method of the controller but the chaining only validate the first form, I tried also with $_SESSION variables but I have to send a large amount of data between each form. I tried with class variable (in controllers and models) but every time the form is send the variable are initialise…
So i wonder if there is a way to switch from a method to another one in my controller giving the data to the new controller.

my first form:

<p>Filtres: </p>

        <br/><br/>
        <form action="" method="post" id="form_ajout_manip" >
        <label for="thematique[]">Thématique</label><br/>
        <select name="thematique[]" size="20" multiple>
        <?php
            foreach($list_thema->result() as $thema)
            {
                echo "<option value='".$thema->THEMATIQUE_ID."'>".$thema->PARENT_THEMATIQUE_ID." - ".
                $thema->NOM."</option>";
            }
        ?>

        </select>
        <input type="hidden" value="true"/>

        <br/>
        <br/>

        <br/>

            <input type="submit" value="Rechercher" />
        </form>

my second form:

<form action="" method="post" id="form_ajout_manip_cdt">
<label for="nom_manip" >Nom manipulation: </label>
<br/>
<input type="text" name="nom_manip"/>

<TABLE border="1">

  <CAPTION><?php echo $data->num_rows.'  '; ?>resuuultat</CAPTION>
  <TR>
    <?php
    foreach($data->list_fields() as $titre)
    {
        echo '<TH>'.$titre.'</TH>';
    }
    ?>
  </TR>

<?php
    foreach($data->result() as $ligne)
    {
        echo '<TR>';
        foreach($ligne as $case)
        {
            echo '<TD>'.$case.'</TD>';

        }
        echo '<TD><input type="checkbox" name="cdt[]"  value="'.$ligne->ID_CANDIDAT.'"
                checked="true"</TD>';

        echo '</TR>';
    }
?>

</TABLE>
<br/><br/>
<input type="submit" value="créer"/>
</form>

Those are the two method of my controller

public function choix()
{
    //controller for the second form
    $this->info_page['title']='Ajout manipulation';
    $this->load->view('ui_items/header',$this->info_page);
    $this->load->view('ui_items/top_menu'); 

    $this->load->view("manipulation/choix",$data);
}

public function filtre()
{
    //controller for the first form

    $this->form_validation->set_rules('thematique[]','Thematique','');
    if($this->form_validation->run())
    {

            $data['data']=$this->manipulation_mod->select_par_filtre($this->input->post('thematique'));
            //need to send $data to the second method "choix()"
    }
    else
    {

        $this->info_page['title']='Filtre ajout manipulation';
        $this->load->view('ui_items/header',$this->info_page);
        $this->load->view('ui_items/top_menu');

        $data= array();
        $data['list_op']= $this->candidat_mod->list_operateur();
        $data['list_thema']= $this->thematique_mod->list_all_thematique();
        $data['list_gene']= $this->candidat_mod->list_gene();

        $this->load->view('manipulation/filtre', $data);
    }
}

Have you any idea? I totally stuck…

  • 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-05-24T12:32:56+00:00Added an answer on May 24, 2026 at 12:32 pm

    Based on your clarification, let me give you an outline on what will work

    View

    Have both the forms in the same page

    <? if(!$filtered): ?>
    
    <input type="hidden" name="filtered" value="true"/>
    /*  Form 1 content here  */
    
    <? else: ?>
    <input type="hidden" name="filtered" value="true"/>
    /*  Form 2 content here */
    
    <? endif; ?>
    

    Controller

    You just need to use one controller

    public function filter() {
    
        $filtered = $this->input->post('filtered');
        $data['filtered'] = $filtered;
    
        if(empty($filtered)) {
            /*  Form validation rules for Form 1    */
            /*  Run form validation etc. */
            /*  Set title etc. for Form 1   */
        } else {
            /*  Form validation rules for Form 2    */            
            /*  Run form validation etc. */
            /*  Set title etc. for Form 2   */        
        }
    
        /*  Load view  */
    }
    

    There might just be a better way to do this, but I am sure this will work. Good luck!

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

Sidebar

Related Questions

We are developing a web based application on glassfish V3. We have 2 application
I have this two sharepoint web application that resides on the same server with
I have develop a small web application in asp.net (c#) for uploading files into
I have to develop an application which parses a log file and sends specific
I have to develop an application using C#.net that has to be run once
I have to develop a tool in C# that retrieves some data from an
This is my first time with Web services. I have to develop web services
Background We need to develop a specialised CMS (internal use only) to support a
I'm trying to build a Quicksilver style search system for the internal web app
I'm trying to pick a web framework that is Java based to start a

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.