Jump to content

Multiple Forms, is this really a problem?


Simmo

Recommended Posts

Hi

 

I have a script that pulls all records out of the database, each record is within a form with no name which results with a lot of forms with essentially the same name.  I have an hidden field with the accID which I use to delete the record.

 

This does what I want it to do but have read that you should avoid having mutliple forms, I guess for validation.  I know I could do this with a link and use GET, but would rather not having this action showing the details of the deletion in the URL.

 

Is multiple forms so bad?

 

Thanks

Link to comment
Share on other sites

Thanks for reply,

 

I can get the value from that but I want the button to say "Delete", if I put the value there it would just show the number to be deleted which would look strange.  Is that what you meant or have I missunderstood.

 

Thanks

Link to comment
Share on other sites

Thanks for reply,

 

I can get the value from that but I want the button to say "Delete", if I put the value there it would just show the number to be deleted which would look strange.  Is that what you meant or have I missunderstood.

 

Thanks

 

Well, I hadn't really thought it through I guess.  :-\

 

You can use an array for the delete buttons where the index is the accID:

 

name="delete[1]" value="Delete"
name="delete[5]" value="Delete"

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.