Gossamer Forum
Home : Products : DBMan : Customization :

Gift Registry - Default User Modify not working

Quote Reply
Gift Registry - Default User Modify not working
Hi, due to the lack of any good wish list/gift registry program, I'm modifying DBMan into a gift registry (since my birthday is coming up). It has some interesting permissions, I set the default user to be able to view and modify all records. I created a quick submit form button to allow the default user to claim gifts (modify record) by sending them to a page that has all the record information displayed but unedittable, except for the "Claimed By" field in which they can fill in their name. The admin and user who created the record (those with $per_del) view the full edittable fields.

So here's my problem. When the default user clicks on the Claim Gift button, the $rec('fields') aren't filled in. But when the registered user clicks on the Claim Gift button, all the fields are filled in correctly. I put a "if ($per_del)" statement to differentiate between the default user and the registered user, so there's no separate Claim Gift subroutine. If the "if ($per_del)" routine gets the fields passed correctly, shouldn't the "else" routine immediately following it get the fields passed along to it too?

I'm not a programmer, though I can edit pretty well, I'm a medical student. :-) Please help me out? Also, I welcome any suggestions about how to add more practicality and functionality.

http://www.ucsf.edu/synapse/gifts/auth.txt

http://www.ucsf.edu/synapse/gifts/db.txt

http://www.ucsf.edu/...se/gifts/default.txt

http://www.ucsf.edu/synapse/gifts/html.txt



Default List: http://www.ucsf.edu/...iew_records=1&ID=*

Default Item View: http://www.ucsf.edu/...=*&nh=6&mh=1

Use test/test to check logged in views: http://www.ucsf.edu/synapse/gifts/db.cgi
Quote Reply
Re: [wender] Gift Registry - Default User Modify not working In reply to
Didn't have a whole lotta time to look, but your guest user (test/test) selects an item to claim and hits the Claim Gift button your are not passing along the gift ID so the db doesn't know which record to get and display for the "Claim Gift" form. You need to put in some hidden tags <INPUT TYPE="hidden" ID="6"> if you are using a submit button, or you could do it as a link like you did on the previous page. (also you have <INPUT TYPE=HIDDEN NAME="modify" VALUE="6"> the value should be 1 - or change NAME="modify" to NAME="ID")
Quote Reply
Re: [Watts] Gift Registry - Default User Modify not working In reply to
Thanks for taking a quick look and replying! I tried changing NAME="modify" to NAME="ID" but it didn't work. Actually, I think NAME="modify" VALUE="$rec('ID)"is the correct INPUT string because the registered user got the full modify form with the fields filled out with "NAME="modify" but when I changed it to NAME="ID" all the registered user got was a full blank modify form.

I'd appreciate any other ideas! Thanks! :-)


Addendum to original post: I'm trying to set up two modifying forms when you click on the Claim Gift button: a full modify form for owners of the record, and a partial modify form that allows non-owners to edit just the "claimed by" field.

Last edited by:

wender: Aug 18, 2003, 11:46 AM
Quote Reply
Re: [wender] Gift Registry - Default User Modify not working In reply to
I didn't look to see exactly what you were doing, but if you just want to setup your add_form to include a "comment" field that can be filled in by a default user without them being able to modify other fields this thread may help provide an easy solution for a user comment field.

Thread: http://gossamer-threads.com/p/000279
Topic: Time and Date Stamp
SimonT - May 18, 1999

I think the version in the FAQ is more detailed, but that site is not working correctly at this time. You can however view the file using the following url:

<url>http://webmagic.hypermart.net/dbman/db/text/field71.txt</url>

It may provide some ideas.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/