Question about CopyFieldValue

GoLive Actions and Extensions - support, comments and suggestions.

Question about CopyFieldValue

Postby djwick » 03/14/2006 @ 10:56

Hi Nate,

A quick question this time. Is it possible to copy a value into a hidden text field using your CopyFieldValue action? I don't want the field to be visible on the page, but still want to use the info in it on submit.

Thanks,

Dave
djwick
 
Posts: 11
Joined: 03/10/2006 @ 22:49

Postby Nate Baldwin » 03/15/2006 @ 11:46

Yep, should work fine with hidden fields. Of course, hard to actually see if working until after the form has been submitted, but it should treat hidden fields just like text fields.
Nate Baldwin
Site Admin
 
Posts: 3724
Joined: 04/25/2003 @ 19:05

Postby djwick » 03/15/2006 @ 17:43

Hi Nate,

Thanks for getting back to me.

I would think it would too, but it's not. My form normally uses POST, but I changed it to GET in order to see in the URL what params are being passed, and the hidden text field is coming up blank. The action does work when I unhide the field being passed to.

I can't get at my GoLive right now, but when I get a chance I'll post the form code. It's real short, just five lines or so, and you'll be able to see what I'm doing.

Thanks,

Dave
djwick
 
Posts: 11
Joined: 03/10/2006 @ 22:49

Postby Nate Baldwin » 03/16/2006 @ 11:02

Yep, please post a link to your form. Did some tests here and it seemed to be working here, but hard to say what the difference might be. We'll get it working one way or another.
Nate Baldwin
Site Admin
 
Posts: 3724
Joined: 04/25/2003 @ 19:05

Postby djwick » 03/16/2006 @ 22:43

Hi Nate,

If you're up to a challenge, I'll fill in the particulars for you.

My test file is at http://www.foothillexpress.com/search-test.html

What I would like to do is integrate searches for two separate features of my website into one elegant little search form having one text input field and two submit buttons.

I've tracked down some javascript that does the "one form, two actions" bit, and it works just perfectly. However, I got stumped by the fact that both search engines rely on the text input name for their search parameter. The problem is that they are programmed to rely on different names.

The one, Coppermine Photo Gallery, which I want to use for photos on my site, needs "search" as its text input parameter. The other, Fluid Dynamics Search Engine, which I am using for articles on my site, uses "Terms." What I needed was some way to dynamically change the input name depending on which search they wanted to do, just like I've solved the issue of dynamically assigning the action.

That's where your CopyFieldValue comes in. I was hoping to have two text input fields, one named "Terms," the other named "search." But one of them would be hidden, and have its value supplied by your CopyFieldValue action. If I have both text fields visible, the action works perfectly. But, if I hide the other field so the user doesn't see it, the value doesn't get passed.

One hitch, assuming I can get that part of it figured out, is that I also want to hide the link that calls the action and either integrate it with the alternate button, or have it automatically fill the other field as the search text is typed in.

Personally, I enjoy these challenges because I can learn so much from them. But, I would understand if you wouldn't wish to make the challenge your own. If you would like to play with the file a bit, however, do the two searches as it stands now. Then download it, unhide the other text input field, and then do the searches. You'll see what I mean. Since I don't have much content on my site yet, you can use the words "snow" or "Debbie" or "Thornton" as search examples.

The worse that can happen is I'll have a separate text field for searching articles and photos, and two separate submit buttons. It's just not as elegant as I would like, that's all.

Thanks,

Dave
djwick
 
Posts: 11
Joined: 03/10/2006 @ 22:49

Postby djwick » 03/17/2006 @ 00:14

Hi Nate,

After fiddling around a bit with different options I discovered some really neat js code that does everything I need it to do. You can see it at http://www.foothillexpress.com/search-newtest.html.

I don't even understand what it is doing, but I understood enough to tweak it to fit what I need. So, I'm happy.

Thanks for your interest, and willingness to help me -- both with the popup window problem and this copyfieldvalue action.

Best regards,

Dave
djwick
 
Posts: 11
Joined: 03/10/2006 @ 22:49

Postby Nate Baldwin » 03/17/2006 @ 11:31

Hi - I was about to download your page, but it looks like you've already found a solution? Glad you got it working. :-)
Nate Baldwin
Site Admin
 
Posts: 3724
Joined: 04/25/2003 @ 19:05


Return to GoLive Actions and Tutorials



Who is online

Users browsing this forum: No registered users and 3 guests

cron