Set input type dynamically

Currently it is not possible to change the input type (short answer, number, email, decimal…).

Captura de Tela 2024-07-24 às 22.52.29

Is this possible to be released, if so, any predictions?

If not, what would be the best way to do this, because using inputs in reusable components would simplify too much, as the same input can be used with different types of data.

Fala mauro, cara, eu fiz um input customizado anteriormente com a base do input do weweb, creio que se você pegar o componente do input e colocar o type dele dinâmico é uma coisa bem simples pelo que eu sei da estrutura

no ww-config.js você vai nas properties e do input type e coloca ele como bindable, depois adiciona um watch nessa propriedade e isso vai mudar o tipo dele!!

não sei se você tem experiência com os componentes customizados do weweb.io,
qualquer coisa da uma olhada no: https://developer.weweb.io/

Thanks for the sugestion.

However, I still prefer to use the WebWeb itself, which is available, to monitor future updates, as it is a basic element in the construction.

You can put them in one component and render them dynamically, right?

I just want to set the type if it is number, answer, email, decimal. This is not possible dynamically so far.

I believe it is not a good option to put them all inside the component and render conditionally. If there was a dynamic option in the type like there are in other options, it would solve the problem.

Hi @mauromequelussi
Have you tried using HTML attributes?

1 Like