Query on default value on text property

Hi,

I am beginner to Pega platform, practicing on requirement

Requirement: when ever we give the value in field , the field name should show in same page .

Ex: if you enter FirstName and LastName, in the same page message should display as “welcome ”

Sol: to active the above, gave default value for the fields and created a “Paragraph” rule and a “expression” for the Paragraph. if both the fields are not equal to the default value display the message . have gave “Refresh” action on both the fields

event → change , action → refresh

My query is when I execute it, default value is showing in fields and I need to delete it and enter the value. Which is not good practice

I am expecting , default value as to show in fields but when I click the text box cursor should be at initial place. or if there is other way to active kindly let me know.

PFA

default value.png

Hi @saiprudhvis,

You can make minor change by calling a DT (“FrameFullName”) which you can call from the refresh action. Create a fullname property

In the DT follow the steps

  1. Set fullName = First name + Last name

  2. Rest first name and last name property.

In the welcome message use the fullname property instead of .firstname + .lastname

I think it helps.

Thanks.

@saiprudhvis

If I understood the requirement correct, you want to show First Name and Last Name fields with the hint text. As soon as user focus on the text field and cursor is on the text field without deleting the hint text user should be able to type.

For this you can use Placeholder instead of Default. Please see screenshot below,