Question

Set watermark in the Empty Selection of Drop Down

  • 13 March 2019
  • 5 replies
  • 85 views

Badge +8

Is there a way to remove or put a watermark in the Empty Selection of a drop down?    Datasource is SQL and our QA mentioned an empty value is not necessarily best scenario.  We don't want to default a value and if the Empty Selection is turned off it auto populates with first record in the list.

 

Anyway to get around this if you are unable to touch the data to add a 'select a record' type row? 

 

 



5 replies

Badge +4

Hello,


 


In the initialize rule you can set a filter on the smo call to return records that are not blank thus resulting in those records not being returned.


 


Regards,


Matt 


 


 

Good day AAschenbrener

 

To answer you question on where can you add or remove a watermark:

1. Navigate to your form and click on the drop-down box.

2. In your properties pane select the watermark property and add text.

 

When this is set, follow the above post on how to set it up not to save any values in the SmartObject.

 

If a reply/replys on this post awnsered your question please remember to mark it as a solution/kudo.

 

Kind Regrds

Jacques.

 

[K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member]

Badge +7

Good day Aaschenbrener


 


Out of the box this is not possible, there are some custom workaround that can be used however those will still save blank records to the smartobject if the empty (custom made watermarked) dropdown option had been selected.


 


Instead of trying to set a waterwark to the empty drop down option I would rather suggest that you add an extra value to the dropdown called "none" and with that, disable the "allow empty selection" option. You can then default the drop down value to the "none" option so that when a user does not have a value that they need to select in the drop down they have the option to select "none" which essentially will allow the record to be saved to the smartobject with a value of none instead of an empty value.



 


Should you feel this to be a valuable feature, you can log it as such on the K2 ideas portal: https://ideas.k2.com/ideas/new


 


Should you feel that this post is of use and or an accurate solution to the raised question, I kindly encourage you to mark it as such using the 'Mark as Solution', 'Kudo' andor ‘Me Too’ options.


 


Kind Regards


Raymond


 

Badge +8

I appreciate the responses above

 

I already have a 'Select a value' in the watermark section of the drop down so I am halfway covered there.

 

However, I want to remove the null / blank value at the top of the drop down list if possible.

I do not have any null values in the SQL Table where the SMO is reading from.

 

If I uncheck the 'Empty Selection Not Allowed' box - it defaults in the first value from my SMO which is not what the user would like.  They wish to have a 'Select a value' as watermark with just the 5 records in the SMO as options.

 

Was looking for an easy way to do this,  I am unable to add a 'None' record row in SQL.

Hopefully that makes more sense


Badge +1

Good day Aaschenbrener, you can try writing a custom jquery to remove the empty item you wanted to remove.

Reply