Open finder location by button, based on field value

Dec 03, 2018

Copy link to clipboard

Copied

Hi There,

I have created a form with fields (Mac - Acrobat pro 2019). One of them is a text field (name=serverpath) where people can paste a server path in (is an Apple File Protocol path). Next to that field is a button (name=button1) which needs to open a finder screen with the location of "serverpath".

If nothing is filled in, there should be a dialog box saying you have to fill in a path.

Does somebody has a suggestion or a solution? Help is very welcome!!

Thanks in advance!

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

143

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Open finder location by button, based on field value

Dec 03, 2018

Copy link to clipboard

Copied

Hi There,

I have created a form with fields (Mac - Acrobat pro 2019). One of them is a text field (name=serverpath) where people can paste a server path in (is an Apple File Protocol path). Next to that field is a button (name=button1) which needs to open a finder screen with the location of "serverpath".

If nothing is filled in, there should be a dialog box saying you have to fill in a path.

Does somebody has a suggestion or a solution? Help is very welcome!!

Thanks in advance!

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

144

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 03, 2018 0
Dec 03, 2018

Copy link to clipboard

Copied

One on the options on Text Field Properties is "Field is used for File Selection". This option can be used in conjunction with JavaScript to open a file selection dialog (i.e. Finder on Mac), however, the initial location cannot be set. This is not an option in Acrobat.

The JavaScript function is "field.browseForFileToSubmit()"

Here's the JS reference entry

Acrobat DC SDK Documentation

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 03, 2018 1
Dec 04, 2018

Copy link to clipboard

Copied

Thanks for the reply, I will take a look at it!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 04, 2018 0
Dec 04, 2018

Copy link to clipboard

Copied

So, it's not possible to paste a link (a folder from internal server) in a text-field and then open that link with a button?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 04, 2018 0
Dec 04, 2018

Copy link to clipboard

Copied

No.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 04, 2018 0
Dec 04, 2018

Copy link to clipboard

Copied

Crap. .. although.. thanks for the efford..

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 04, 2018 0