8 years ago
Topic

Hi there, I'm trying to do something simple and coming up blank.  I want to change the link text for the upload field.

Image of Upload Link Text

I have two fields in my form.  Attachment Title 1 and Attachment Upload 1.  I am trying to get the Title for the attachment to be the link text of the upload file.  

HTML+ = $cck->getText('attachment_1_title');

if I try this

HTML+ = Click Here then I get "Click Here" as the Download link text.  I've read all the tutorials and forum message I could find but can't get it to work as desired.

http://www.seblod.com/resources/manuals/designer/playing-with-typographies

Also, is there a way to trigger PDF download to open in a browser instead of causing the file to download.

Get a Book for SEBLOD
4229 Posts
Kadministrator
8 years ago
2
Level 1

You need to use

$cck->getValue('attachment_1_title');

getText only works on fields that have text and link (file upload, image upload, link etc), but attachment_1_title seems to be a normal text field.

8 years ago
0
Level 2

Thank you Klas, I actually thought I tried that variation but I guess I did not.  Your solution worked for me.  Thank you for the help.

8 years ago
0
Level 2

Hi Klaus, sorry to revisit this question but I'm struggling to get this to work in a GroupX situation.  Is there any reason why this wouldn't work the same for groupX?

Using the same code that worked for me before, now in GroupX the Doc Upload link looks like this.  The link just shows the code that is in the html+ box for the field in my groupx content item upload field.


Warning: Creating default object from empty value in /home/staging/2/-international/plugins/cck_field_typo/html/html.php on line 137

------------------------------------------------------

1283 Posts
Bucklash
8 years ago
0
Level 1

Hi

Check this tutorial:

calling-field-x-and-group-x-content-in-an-override

 

Maybe has the answer? Have you tried that format in the typo?

99 Posts
SimonD
7 years ago
0
Level 1

Hi lownotes,

I'm facing the same problem.

Have you found a solution?

Regards

4229 Posts
Kadministrator
7 years ago
0
Level 1

Take a look at tutorial linked by Bucklash

Get a Book for SEBLOD