I am building a small site for a friend who is getting married and they have their gift list online. Each gift is a node which I am thinking will have a boolean field called something like "bought". The functionality I want to create is that visitors can look at a list of gifts and, if they want to buy something for them they just need to click a button next to it.

So my question is simple, can I change the value of a node field when a user clicks a button?

  • if this is the exact use case, and you don't want to use the contrib module Wishlist mentioned by @molot, this sounds like a great use of the status field already there, eg, upon purchase, unpublish the node.
    – Jimajamma
    May 20, 2013 at 11:30

1 Answer 1


There is a ready contrib module: Wishlist.

Other site users can indicate their interest in purchasing an item from a wishlist. When that happens, everybody can see that somebody purchased the item and duplicated gifts are eliminated (or reduced - the wishlist module does rely on people playing nicely together).

If you just want the job done, that's your way to go. If you want to learn, read about node_save() and Form API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.