Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By aura9k1
Good day,

Is there a way to change the Placeholder value of a field using Javascript? Using setValue or setText does of course not achieve the required result.
By ewallace
Given a main form named "Employee Info" which includes a subform named, "subform Checklist", which has a dropdown control named "Department Head", how would I set the PLACEHOLDER for "Department Head" via JavaScript?

Explanation of partial trigger code further below:
"departmentHead" is a dropdown on "subform Checklist" with a PLACEHOLDER of "Please select from list"
If they select "yes" for "bannerAccount", select a value from the dropdown for "departmentHead", then set "bannerAccount" back to "no", I clear the value for "departmentHead".

However, this eliminates the "Please select from list" PLACEHOLDER if they later change "bannerAccount" back to "yes",
thus displaying the top value for "departmentHead" by default.

How do I set "departmentHead" back to the PLACEHOLDER value after I clear it?

function showOrHide_bannerAccountDetails() {
if ($("#bannerAccount").getValue() === "yes") {
} else {
User avatar
By kirkwg
Hi there,

I want to help but still don't get a full picture for your question? Mind to draw a picture or give example to show what is before it looks like and what is after it looks like?? Thanks.
User avatar
By kirkwg
Hi there,

Thanks for your explanation, now I understand your issue. What you had encountered the behaviors were normal, if based on processmaker doc below for 1/ and 2/:

1/Only the dropdown control always selects a value when it is first rendered. In order to define an empty or null value, create an option without value and add any description such as “--Select an option--”.

2/ Placeholder - Once an option is selected the placeholder will disappear.

//my suggestion below:
Placeholder only show one time at initial, once you have selected an option or you reset it to empty "" by JS, the same, won't show the placeholder again.

Solution: e.g. add " --Please select a choice--" as a null choice and check later
-- --Please select a choice--
PREV Take over previous number


Hi, I tested with the latest version of the commun[…]

Can anyone solve my problem please? :roll: :roll:

hi. i have two grid and that is fix in 31 rows i […]

:D :D tanks a lot, it is working