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 8210385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:03:34+00:00 2026-06-07T10:03:34+00:00

Objective: list a set of records with a checkbox next to each along with

  • 0

Objective:
list a set of records with a checkbox next to each along with a “delete” input. If the user checks one checkbox or multiple checkboxes, the submit action will get the id of each checkbox and delete corresponding record(s).

I know this functionality is provided on the backend, but I’m trying provide the functionality to the frontend users that are logged in.

Update: I can now render the widget correctly, but am still having difficulty capturing the ID of the checkbox(s) that are selected. Help here would be appreciated.

Index page:

<h1>Jobs</h1>
<?php include_partial('list', array('saved_jobss' => $saved_jobss, 'form' => $form)) ?>
//I'm not sure if I can even pass two objects??  

Index action:

  public function executeIndex(sfWebRequest $request)
  {
     $userId = sfContext::getInstance()->getUser()->getId();
     $this->saved_jobss = Doctrine_Core::getTable('saved_jobs')->getSavedJobs($userId);    
     $this->form = new Saved_JobsForm();
  }

Partial page named: _list

<table class="sortable">
  <thead>
    <tr>
      <th>Delete</th>
      <th>Company:</th>
      <th>Job name:</th>
      <th>Job No.</th>
      <th>Saved:</th>
    </tr>
  </thead>
  <tbody>    
    <?php foreach ($saved_jobss as $saved_jobs): ?>      
    <tr>
      <td> 
          <?php echo $form['id']->renderRow() ?>
      <td>
           <a href="
               <?php 
                   $jobId = $saved_jobs->getJobId();                
                   echo 'job/'.$saved_jobs->getJob($jobId);
               ?>
           ">
               <?php 
                   $jobId = $saved_jobs->getJobId();
                   echo $saved_jobs->getJobCompany($jobId);
               ?>
           </a>
      </td>
      <td>
               <?php 
                   $jobId = $saved_jobs->getJobId();
                   echo $saved_jobs->getJobName($jobId);
               ?>
      </td>
      <td>
               <?php 
                   echo $saved_jobs->getJobId();
               ?>
      </td>
      <td><?php echo date("M-j-y", strtotime($saved_jobs->getCreatedAt())) ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
<input type="submit" value="Delete" />
</form>

Action:

  public function executeSubmit(sfWebRequest $request)
  {
      $this->forward404Unless($request->isMethod('post'));
      $params = $request->getPostParameters();                   
      $this->redirect('saved_jobs/deleteConfirmation?'.http_build_query($params));       
  }

Form class:

class Saved_JobsForm extends BaseSaved_JobsForm
{
  public function configure()
  {
      $this->widgetSchema['id'] = new sfWidgetFormInputCheckbox();          
      $this->widgetSchema->setLabel('id', false); 
  }
}

I tinkered with the idea of using javascript, but was unsure if that was the way to go or not. Any help, or a point in the right direction would be most appreciated. Thanks in advance.

  • 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-07T10:03:38+00:00Added an answer on June 7, 2026 at 10:03 am

    Solved: I just passed a link to each record with the action and record Id.

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

Sidebar

Related Questions

Objective: I have a list of header files (about 50 of them), And each
I'm working on a game with monsters. Each one has a list of stats
Is there a way to get the list of currently running threads in objective-C?
Objective-C uses a sophisticated message-passing system when one object calls a method on another
Objective: In support of a Windows Service that may have multiple instances on a
Using Objective-C, how can I give/take the permissions for all user to read a
I'm new to objective-c and would like to understand how to set a file
I'm relatively new to Objective C and while I've been trucking right along writing
Objective: To create an Index that accommodates a pre-existing set of price data from
While learning objective-c, I've made a basic mac shopping list app with 3 interface

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.