Adding an Element to Page Using Velo/Corvid

Hello, this may seem like an amateur question, but in Javascript the equivalent code would be:
var element = document.createElement(“p”);

I’m a newbie at learning Javascript and I’m basically learning Velo/Corvid at the same time :P.

I understand that Velo uses $w(“id”) to access a Page Element and that I would probably have to reference the Element as a Child of the Page or something, but I just need someone to give me a definitive answer on the matter with a simple example.

My end-goal is to create input text boxes that appear on the page with the click of a button, to give my website visitor the option to input more data in a fashion that would be easier to organize systematically. I know how to do it in Javascript but I would like to see how it is done (if it can be done) in Velo.
Would the last measure be to write the function in the back-end (which is pure Javascript) and then import it into the front-end? Can someone give me the Velo equivalent to document and createElement? Thanks and God Bless :grin:

Nevermind, I solved it myself. I added the Elements I wanted beforehand and used logic and the show() and hide() Functions to hide what I wanted and used a Drop Down List to designate the Number of the Elements I wanted to show.

Instead of setting the number in the beginning (using a drop down list), you can an unlimited number of additional entries dynamically by using a Repeater. See these examples:

Did you get your solution on “Adding an Element to Page Using Velo/Corvid”?

1 Like