Ole,

Would an autocomplete textfield work in your situation?

Basically, when text is entered in the textfield, it triggers a function which takes the text and returns a list of results the user can select from. In your case, they user could type the textfields into the textbox, and the autocomplete function could return a list of URLs the user can select from.

There's a quick set of instructions on autocomplete fields at http://drupal.org/node/208424#comment-686252. You can get more info by searching drupal.org.

Brian Vuyk
Web Design & Development
T: 613-534-2916
[email protected] | http://www.brianvuyk.com


Ole Kerpel wrote:

Hi all,


not very familiar with Drupal development, but I'm working my way through Pro Drupal Development which helps a lot.

I was wondering how I could implement the hook_form, in order to create a form within the Drupal generated form.
Can I add php in the <mymodule>_form or does Drupal offer ways here?


Here is my case. I am creating a module that stores nodes with several textfields. One of the fields is mandatory and should contain a url. The user must be able to search for the urls by posting keywords to an web service. When the result comes back the user must be able to select a url which is then stored in the right field. after that, the user is able to add some text and then submit the form the Drupal way.


Any help is welcome, thanks advance for the trouble taken.



Ole Kerpel
Developer

Internationaal Instituut voor Sociale Geschiedenis
Postbus 2169
1000 CD Amsterdam
T: 0208500137
E: [email protected]
www.iisg.nl


Reply via email to