Jump to content

Search the Community

Showing results for tags 'batch-delete'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hi again guys, as part of my plan to offer a fully-fledged front-end student management system for my site, I'm trying to add a page where there is a list of all students and a checkbox next to each name. Whichever student has a checkbox next to their name gets deleted upon form submit. Have tried the following but think I have lost my way! <?php if($input->post->submit) { $students = $pages->get("template=students")->children(); foreach ($input->post->$student->name as $s) { if (isset($s)) { $deletable = $users->get($student->name); $deletable->delete(); echo $deletable->name . " has been deleted!"; } } } ?> <form action="" method="post"> <ul> <?php foreach ($students as $student) { ?> <li> <?php echo $student->name; ?> <input type="checkbox" name="<?php echo $student->name; ?>"> </li> <?php } ?> <input type="submit" value="Delete selected users" name="submit"> </ul> </form> Am I missing something simple here? For those who are stuck doing similar things, I have managed to get the adding and modifying students front-end bit pretty sorted I think so more than happy to lend a hand!
×
×
  • Create New...