Jump to content
  • 0

[FYI] Item picker for characters with diacritical marks


Wikiwi
 Share

Question

Just wanted to share this usecase to allow user to input characters with diacritical marks in them(è, î, ñ, â).

This small modification will help users input characters with diacritical marks using a dropdown list and a button. For this scenario, I will use a submission form but this can be modified and can be used to Single Record Update and Details Page.

First, you would need 2 new fields for each text field or text area you wish to implement.
- 1 virtual field set to a dropdown list that will contain the characters.
- 1 HTML block that will serve as a button and container of the javascript.

Here is the script that needs to be inside the HTML BLOCK:

<style>
#letter{
    background: #3B6AD2;
    border: none;
    color: #FFFFFF;
    display: inline-block;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    text-transform: uppercase;
}
</style>

<button type="button" id="letter">pick</button>

<script>
document.getElementById('letter').addEventListener('click',AddLetter);

function AddLetter(){
document.getElementById("<textfield_ID>").value = document.getElementById("textfield_ID").value + document.getElementById("<virtualfield_ID>").value;
}
</script>

Sample Output:

Screenshot_1.png.06de166a1cbf149fb40cb9fbaa1e19e9.png

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...