Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • konius 17 posts 47 karma points
    Jun 06, 2024 @ 15:12
    konius
    0

    umb-property validation Umbraco v14

    Hi,

    I am trying to run a umb-property-dataset and umb-property setup for a custom property editor or dashboard for Umbraco 14, however I can't get the front-end validation working.

    Has anyone got examples how to set it up?

    return html`<umb-property-dataset
    .value=${this.value && this.value.properties ? this.value.properties : []}
    @change=${this.#onPropertyDataChange}>
    ${repeat(
        this._settings ?? [],
        (itm) => itm.key,
        (itm) => html`<umb-property     
            alias=${itm.alias}
            label=${itm.label}
            description=${itm.description}
            .dataPath="$.values[${this._settings?.indexOf(itm)}].value"
            .config=${itm.config}
            .appearance=${appearance}
            property-editor-ui-alias=${itm.editorUiAlias}>
        </umb-property>`)}
    

    `

    Thanks,

    Paulius

  • Bishal Tim 26 posts 115 karma points c-trib
    Jun 06, 2024 @ 15:20
    Bishal Tim
    0

    hi @konius

    im also working on using

      <umb-property
       label="Name"
       description="Enter the name"
       alias="textProperty"
       property-editor-ui-alias="Umb.PropertyEditorUi.TextBox"
       .value=${this.name}
       @value-changed=${(e: any) => {
    

    this.name = e.detail.value; }}>

    this is not inputing content, what am i doing wrong?

  • konius 17 posts 47 karma points
    Jun 06, 2024 @ 15:25
    konius
    0

    I believe you need to call UmbPropertyValueChangeEvent and do your logic there. At least the example shows that.

    Follow their example and work your way back...

    https://docs.umbraco.com/umbraco-cms/tutorials/creating-a-property-editor

Please Sign in or register to post replies

Write your reply to:

Draft