Project:Prepopulate
Version:6.x-1.1
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

This seems like a great idea - perhaps it will allow me to prepopulate my comment form 'homepage' field with 'http://'?

But as is often the case with drupal, i feel like i'm reading documentation that starts about halfway thru. Maybe technical people get it, but us semi-technicals are left clueless.

For this module, the many example URLs look great, but would someone be so kind as to tell me where to put these bloody things?

For example, this URL is on the project page: http://www.example.com/node/add/blog?edit[title]=this is the title. What would you do with that to make it function?

I'd be even more grateful if someone could offer a few URL examples that apply to comment fields specifically. Would they follow the same pattern as the others and look like: .../node/add/content?edit[homepage]=http://. I imagine not, but am not sure what would be correct.

Thanks in advance for any assistance.

Comments

#1

Hello John,

What are you trying to do?

I was using this module to make bookmarlets, are you doing something similar?

I'm trying to imagine how you want to pre-populate in a comment field, and where this info comes from.

If you can give an example I think myself or someone else can help more.

#2

hi heather:

thanks so much for following up.

quite probably, i don't understand the basic premise of this module. for instance, i don't know what a 'bookmarklet' is. I see the terminology in the module docs, but no idea what it means. the docs, while more informative than some modules, is so vague and/or assumes so much prior knowledge that i really have no idea what it does - but the basic idea of 'prepopulate any field' sounds like it might do the trick.

the specific (and only) thing i was thinking to do was to prepopulate my comment form 'homepage' field with 'http://' so that users don't get an error when they fail to enter it. it is a drupal pet peeve of mine knowing that my commenters get that error ~100% of the time since there is no way, a priori, for them to know to put it there. i acutally just posted another support request about this earlier yesterday - http://drupal.org/node/621342 - and then saw this module mentioned. and i was on the mollom site yesterday and they do this thing exactly on the 'add subscription' page.

for this to work, then obviously as on the mollom page, users would need to be able to continue typing onward from the http:// - which this module may or may not allow.

any further ideas are welcome.

thanks again.
john

#3

Same help needed here. But you said it better than I: "would someone be so kind as to tell me where to put these bloody things?"

Please? Where the heck is the URL for my comments controlled (I use nodecomments to make my comments nodes, so THAT'S not the issue. Think even more basic!)

Thanks!

#4

Hi John

This is probably not the right approach for what you're trying to do. For that to work users would have to follow a specifically crafted link that was something like 'http://example.com/node/1234?[edit][homepage_url]=http://' (the encoding and url isn't right here this is just to make a simple illustration). If users didn't follow that specific URL and just went to http://example.com/node/1234 the page would still work it just wouldn't have the homepage field with the default value.

The reliable way to do what you're asking is a custom module that does a hook_form_alter() to change the default value to the homepage field to http:// or does a validation and adds the http:// in those cases where users forget it. I did a presentation on the basics of this sort of development and the slides are here: http://w.cali.org/conference/session/77

To answer your other question a bookmarklet is a javascript bookmark that goes in your browser's bookmark bar. Because it has javascript it can do things like take the name of the page you're on and include it in the URL field of the bookmarked page so you can automatically fill in on the form you've bookmarked.

Josh

#5

Thank you, Josh. Very helpful.

That helps me make clearer sense of what this module does.

And I appreciate your tutorial on building modules. That gave me some better idea of what's involved - but it's still over my head all the variables and the php. Getting there, but not quite.

In the meantime since posting, I did figure out that I needed a little module for my http:// thing - and commissioned a guy to create it. Actually got it the other day and need to test it out today to see if it does the job.

#6

Status:active» fixed

Cleaning up old issues. This was resolved some time ago.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.