- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2025 12:03 AM
i am creating the filed , with name comment and data type is string. and than i added default value as please add comment. when user click on the field the default value need to erase . how can i achive that.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2025 01:26 AM - edited 06-21-2025 01:27 AM
@vits18735a0 Did you give the script above a try? It works the same way—the placeholder shows only when the field is empty. Once the user types something or clicks into the box, the placeholder disappears automatically.
Don't use the default value here...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2025 01:41 AM
@vits18735a0You can use a single client script to add placeholders to multiple fields—there’s no need to create separate scripts for each one.
Sample:
function onLoad() {
var placeholder_1 = g_form.getControl('field_1');
if (placeholder_1) {
placeholder_1.placeholder = 'Enter your text here';
}
var placeholder_2 = g_form.getControl('field_2');
if (placeholder_2) {
placeholder_2.placeholder = 'Enter your text here';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2025 01:26 AM - edited 06-21-2025 01:27 AM
@vits18735a0 Did you give the script above a try? It works the same way—the placeholder shows only when the field is empty. Once the user types something or clicks into the box, the placeholder disappears automatically.
Don't use the default value here...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2025 01:35 AM
With out default value it is working fine. so from on now for any feild i will use the client script to show the placeholder.
For one or teo feild we can do like this but what if we have 20 fields and need user input. we need to give the example to user right. for every field we did not able to create the client script right.
I think we need to different solution other than onload.
Thanks @J Siva for given the clarity onload script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2025 01:41 AM
@vits18735a0You can use a single client script to add placeholders to multiple fields—there’s no need to create separate scripts for each one.
Sample:
function onLoad() {
var placeholder_1 = g_form.getControl('field_1');
if (placeholder_1) {
placeholder_1.placeholder = 'Enter your text here';
}
var placeholder_2 = g_form.getControl('field_2');
if (placeholder_2) {
placeholder_2.placeholder = 'Enter your text here';
}
}