Binding dynamic value to autocomplete placeholder and input validation messages

Issue 1: Binding a dynamic placeholder value to an autocomplete input field.

I set a dynamic placeholder in this autocomplete search input field like this:
<input class="form-control rounded-start" type="search" is="dmx-autocomplete" id="home_search" name="HomeSearch" dmx-bind:data="Search.data.Products" optiontext="TranslationProductTitle" optionvalue="ProductID+'/'+TranslationProductTitle.slugify()" dmx-on:changed="browser.goto('/product/'+home_search.value.split('/')[0]+'/'+home_search.value.split('/')[1])" dmx-bind:placeholder="staticTranslatedPhrase.value.SearchFor">

It doesn't show the placeholder, although the translated phrase with SearchFor key is definitely retrieved successfully, I ensured that.

When I set a static placeholder like this, it does show:
<input class="form-control rounded-start" type="search" is="dmx-autocomplete" id="home_search" name="HomeSearch" dmx-bind:data="Search.data.Products" optiontext="TranslationProductTitle" optionvalue="ProductID+'/'+TranslationProductTitle.slugify()" dmx-on:changed="browser.goto('/product/'+home_search.value.split('/')[0]+'/'+home_search.value.split('/')[1])" placeholder="placeholder">

So it seems dmx-bind doesn't work on autocomplete fields, at least not for the placeholder attribute. Or do I have to set it in another way?

Issue 2: Binding dynamic validation error messages to input fields.

In a registration form I validate input data. For example I want to validate the email address input:
<div class="col-sm-6"> <label class="form-label" for="reg_email" dmx-text="staticTranslatedPhrase.value.Email">E-mail Address</label> <input class="form-control" type="email" required="" id="reg_email" name="RegEmailCustomer" data-rule-email="true"> </div>
The validation rules are set here in AC, but actually are not shown unless set in SC. So that's what I did:
image

These messages however can't be set to a dynamic value (e.g. a translated phrase based on a defined translation key retrieved from a database table).
Also for SC's `Validate Data' this is not possible:

How can I use dynamic values for these messages?

Thanks for any help in advance!

Either nobody seems to be able to help me with this or my help request is not clear or what I want to achieve is impossible.
Is it even possible to bind a value to an autocomplete field's placeholder and input validation messages @Teodor?

Interestingly enough, I just requested that the validator have full bindings server side haha. Hopefully @patrick can work his magic.

1 Like

Voted! :+1:

1 Like