WebSite X5Help Center

 
Len K.
Len K.
User

Contact form not working X5 Pro 2023.1.5 for send data to a file option  en

Auteur : Len K.
Visité 1195, Followers 1, Partagé 0  

In 2023.1.5 a form using the "send data to a file" option does not appear to generate html correctly for a form command. After the fields are filled in the "send" button does not respond to being clicked.  I have used a similar form in X5 Pro 2022.17 and everything worked correctly. The same form works correctly if the option send data to the database is selected, the button responds correctly and the data is entered into the database. I haven't tried the send by email option.

I have looked at the generated code :
generated by 2022.1.7 I find a line:  <form id="imObjectForm_1_form" action="imemail/buch_transaction_insert.php" method="post" enctype="multipart/form-data"> 
A typical html<form>command.
generated by 2023.1.5  I find: <form id="imObjectForm_10_form">  and nothing more.

Both generated html files have after the </form> command a script line <script>x5engine.boot.push('x5engine.imForm.initForm ... where the "action" file is listed.

Maybe there is a clever way to work a form without the action and method in the <form> command, but it is not working in my new project.

Posté le
5 RéPONSES
Aleksej H.
Aleksej H.
Moderator

Hello. Please send a link to the page with the form.

Lire plus
Posté le de Aleksej H.
Len K.
Len K.
User
Auteur

I have made a very simple stand alone page which shows the problem - it is exactly the same when the form is on a password protected page with other links, here there is no other influence. The problem is the same, the send button does nothing as it appears the html form command action is not defined. When the form is configured to write to a database it works.

Attached are screen shots of the definition in X5, the link to test the generated code is:

http://hva-admin.killicks.de/hva-termin-list-select.html

Lire plus
Posté le de Len K.
Len K.
Len K.
User
Auteur

Supplementary comments to the contact form.

1. When a simple button is configured it is possible to choose that the button click links to an external file or a project-internal web page (and a lot of other things), but in the contact form the only possibility is for the send button to link to an external file (OK, the file is then added to the project library and uploaded). It would be nice to be able to like the send button press to an internal project page so that the script data can be kept in and edited within the project.

2. In the list of field types that can be placed in the contact for it would be nice to be able to have an invisible field that only sets a data value to pass onto the processing script page (i.e. the <input type='hidden'> html command.

Lire plus
Posté le de Len K.
Incomedia
Stefano G.
Incomedia

Hello Len

I've tested this and the submit button actually works.

It sends the data to this file you specified:

However, the server reports an Error 500 which needs to be sorted out with the hosting's error log. The submit of the form works, but the PHP file receiving the data is apparently not handling them right

I remain available here

Stefano

Lire plus
Posté le de Stefano G.
Len K.
Len K.
User
Auteur

Hello Stefano, 

Thank you for the quick response, I will try the code on another server, and follow up the problem on the first server. 

Regards

Len

Lire plus
Posté le de Len K.