I want to creat a dynamic external link where the dynamic part comes from a custom input field
ex http://www.thisSite.com/[field_newest]/pageID
I've tried putting the above in the default field, but it doesn't work. I'm guessing that may be because it validates the link before it includes the field or it could be that I just don't know how to make it work.
Help, please
Connie
Comments
Comment #1
quicksketchTokens don't work on the URL field. Regarding setting default values, you can't set a default of a field based upon another field in the same form, since the field used as a token hasn't yet been filled out yet either. To accomplish the default value you're wanting, you'll probably have to use PHP to set the default.
Comment #2
conniec commentedThanks for the reply. Now to dig out my PHP manuals. My programming is SO weak.
Connie
Comment #3
conniec commentedIf I enter this PHP snippet at the bottom of the cck text field
if((aray) $field_number ['value] >= 120
{
print "This is big";
}else {
print "This is not big';
}
and then, in Views, I add field text:number to my view, I get the original number and not the statement. I'm not really sure where the php output ends up?
Help, please.
Connie
Comment #4
quicksketchClosing after lack of activity. Sorry you were unable to receive an answer conniec.
Comment #5
minus commentedHelo
I'm working on a project where I need a field with a default url. The client fills out the form a combination of the default url and what the user submits should be the final url
Default setting for the link field should be something like this: http://www.link.com/#, when the user submits his form, the field should be http://www.link.com/#*****, and display on the node like "go to website"
Really need this function and hope you can help me :)
Morten|Norway
Comment #6
minus commentedopen this thread again :-/
Comment #7
jcfiala commentedI'm tempted to mark this as a duplicate of #412404: CCK link should take token as part of URL - Could you look at that and comment on it?
Comment #8
minus commentedgot it to work with views
content field and select "Output this field as a link", add the url and Replacement pattern: http://example.com/[field_your_field__value]