Problem with POST method

Hello there!

I am a basic Wix User. I currently manage www.advancedidiomas.com and adersondasilva.wixsite.com/musica.

I would like to add a login feature to the advancedidiomas website, which will then redirect my students to our websystem, hosted at www.kaits.com.br.

The software developer gave me the instructions, and a friend who understands programming wrote the following code for me:

<form action="http://www.kaits.com.br/inicial.php?txttop=423" method="post">
  Usuario: <input type="text" name="usu"><br>
  Senha: <input type="password" name="sen"><br>
  <input type="submit" value="Submit">
</form>

He tried this code out on a test webpage and it worked. However, I tried to add it to my webiste through the HTML Code feature, but without success. The window displays the “Usuario” and “Senha” fields and the “Submit” button (which I would also like to rename to Portuguese), but they are not responsive. Additionally, I cannot fix the layout/fonts.

Is there a way I can make a menu that activates when the mouse hovers over it, and then pops these fields up? There is an example of that on the very website of KAITS (www.kaits.com.br) as you click on “ACESSAR”. It could even be like a menu item that shows the login/password fields as you click/hover over it.

Thank you!

You can’t use your code in Wix Code.

WixCode understands all of Javascript, except for anything that accesses the DOM. This keeps the user from inadvertently “breaking” something. Accessing document elements such as div, span, button, etc is off-limits. The way to access elements on the page is only through $w.

It’s very easy to create a form with Wix Code. How to Create a Custom Form is an excellent video tutorial which explains how it’s done.

You should review the Wix Code docs for more information on programming in Wix Code.

You might want to take a look at a Basic Form example . You can load it into your editor, play with it, and modify it.

Good luck and have fun,

Yisrael

Hello there Yisrael,

Thank you for the reply. I did click the links you posted and read through it a bit. I reckon that my lack of knowledge in the field might be making it difficult for me to actually understand whether I am going to be able to make it work or not. From what I have read, they store the information submitted by the user and may display it on the website, rather than sending the username and password to the website where my system is hosted.

I do not need to store any data; I just need the username and password to be sent to " http://www.kaits.com.br/inicial.php?txttop=423" via POST method, so that their page can accept it and log my users in.

If you don’t mind answering: If I follow the instructions on creating one of these forms, will I be able to have one of these forms work on my site and use it instead of the code I published? If so, how should I proceed?

Thanks again!

As I stated before, those forms will not work with Wix Code - period. Using the examples and documentation that I linked to in my previous post, you will be able to easily create forms that do just about whatever you want.