dynamic save path

Caldera Forms Bug Released
6 June, 2020 02:36:29
pkusmierczuk
Topics: 1
Messages: 2
Hello,

I want to save every pdf file to user folder based on their username.

For example: if user X fills a form, pdf is generated and saved automatically to directory wp-content/user/X, user Y to wp-content/user/Y and so on. I know that directory must be created beforehand.

I've tried to use this shortcode but with no luck:
[e2pdf-save id="1" name="%name%" dir="wp-content/user/{user:user_login}/"]

I don't know how to declare this variable {user:user_login} cause i tried to use static username and it works flawlessly.
Also, when using this variable outside shortcode (in Success Message) i'm getting my username correctly.
Is it variable itself, is it wrong syntax? Is it doable at all it this way? Please help.
6 June, 2020 07:08:58
E2Pdf
Support
Topics: 7
Messages: 3156
Hi,

We could replicate issue from our side. Please expect update in nearest time. We will update this thread as soon as it will be any news. Sorry for inconvenience.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
7 June, 2020 00:06:50
pkusmierczuk
Topics: 1
Messages: 2
Thank you for quick reply, I'll be waiting for your response.
9 June, 2020 02:47:25
E2Pdf
Support
Topics: 7
Messages: 3156
Hi,

We just released update (1.11.02) which contains fix for dynamic dir path. It was also added additional attributes ("create_dir", "create_index", "create_htaccess"), more information can be found on documentation page: https://e2pdf.com/support/docs#shortcode-e2pdf-save

Let us know please if you will face any issues after update. Thank you.

We remain at your service.
We would really appreciate your feedback at WordPress.org!