We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Problems with Module Creation

Development and Programming

Gwarrior's avatar
Gwarrior
40 posts
16 years ago
Gwarrior's avatar Gwarrior

I am making a module for EE2 that will house contact information collected from a contact form on the actual site. Currently, it installs just fine and displays the contacts as I want.

However, when it asks what I would like to do with the checkbox-selected rows (delete_selected or edit_selected), both seem to launch the same query string: (see attached image)

/system/index.php?S=609b2381909572d1d6ea5fe15cbe1c7f9d8f6d3c&D=cp&C=addons_modules&M=show_module_cp&module=contact_manager&method=edit_contacts

Am I supposed to create a function (method) in the mcp.contact_manager.php file called ‘Edit Contacts’, then write if-else statements to determine if the action came in as ‘delete’ or ‘edit’? I tried this and it didn’t work.

The tutorial for creating modules seems to leave out how to accomplish edits and deletes.

I’m wondering how I can accomplish this?

Thanks!

       
Ingmar's avatar
Ingmar
29,245 posts
16 years ago
Ingmar's avatar Ingmar

Moved to “Modules”, where I think it’s more appropriate.

       
Bjørn Børresen's avatar
Bjørn Børresen
629 posts
16 years ago
Bjørn Børresen's avatar Bjørn Børresen

Gwarrior - I assume you’re submitting the form as usual, and in EE there is usually a dropdown select at the bottom - so just check the selected value for that in your submit method .. if it’s edit, redirect to an edit page or something.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.