Posted by christopherareed on March 25, 2009 at 10:40pm
I'll try to keep it short and simple. I have a content type that contains a number like 10000. It's like an ID number that is used for something outside of Drupal. Everytime someone inputs more data to a new page, that page gets the #10001, then 10002 etc. Is there anyway to just have that field automatically fill itself in by calling the content type via php then search for the field ad_number, and return the highest value+1? I've been digging through the api drupal website (and googling php syntax) and I'm kind of stumped for as simple as this seems. Anyways, thanks ahead of time. I'll post back if I figure out.
Comments
I haven't used it yet, but
I haven't used it yet, but the computed field module for CCK sounds like it may work. You can assign it's value through PHP code. So you should be able to create an SQL query to find the highest ad_number and then simply +1.
Complete Computer Care
Ooo, checking it out now,
Ooo, checking it out now, thanks! I'll write back how it goes.
http://www.hotautoweb.com
http://www.clutch-games.com
The Type local nids module
The Type local nids module sounds like it would meet your needs.