Dropzone with Placeholder with Dynamic Content | Community
Skip to main content

Dropzone with Placeholder with Dynamic Content

  • September 22, 2023
  • 3 replies
  • 0 views

We have to add a second language on our ticketing system. I am currently creating dynamic content for the guide and ticket forms. I have the code below to upload attachments on $(document).ready(function() in script.js

$('#upload-dropzone').append('<br>You can also paste copied screenshots by pressing CTRL V on your keyboard');

I created a placeholder in dynamic content which has the english and french version of the text above.

What method do i use to replace '<br>You can also paste copied screenshots by pressing CTRL V on your keyboard'

with

{{dc.attachments}}

Nothing has worked so far

Thank you

 

3 replies

Pulkit12
  • September 23, 2023

Hi Patrick Bernardi

To efficiently update the text of the dropdown attachment based on language using Dynamic Content, it is important to follow a specific process. First, add the following code to your document_head.hbs file: 

<script>
  var attachmentTitle = "{{dc "attachments"}}";
</script>
Then, in your Script.js file, use the dcValue variable to update the dropdown attachment based on language. By following these steps, you can ensure that your dropdown attachment is always up-to-date with the correct language.
$('#upload-dropzone').append("<br>",attachmentTitle);

Please don't hesitate to let me know if there is anything else that you need help with.

Thank You 

Pulkit

Team Diziana


  • Author
  • September 25, 2023

Thank you, that worked like a charm.


Pulkit12
  • September 29, 2023

Hi Patrick Bernardi

Happy to hear that ;)