#6605 (A feedback form for collecting contact data)
by Luc Saffre · in Developers · assigned to Luc Saffre
Kurzbeschreibung
Seems that every good website needs a feedback form where anonymous users can leave their contact data. So we need this for #6588 (A new website for saffre-rumma.net) we .
Kinder
Kommentare
- 8 Monate ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Uff, I pushed my changes (in lino, xl, book, welfare and react).
- 8 Monate ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : I simply say parent='root' when adding these two pages to SpecialPages. That's a satisfying solution for this ticket. I'll create a separate ticket about these SpecialPages.
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Uff, after five days the submit button finally works. Last issue before I plan to push my changes is how to link to these pages. The body of SpecialPages.home might simply link to SpecialPages.contact.Or a link in the footer. And what about the CreateUser webform. And then there will be other webfor...
- 8 Monate, 1 Woche ago von Sharif Mehedi Antwort auf Luc Saffre about #6605 (A feedback form for collecting contact data) : This is for the "insert" action only. Other then "grid", "detail" and "show" (the navigating actions) there are no other action that act with a URL.
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : But ar.get_request_url() was never meant to work for POST actions. No no, it seems that this is the first time that the server wants to know the URL of a submit action.
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) (1 Antwort) : I see that DialogFactory.create() says path = `api/${execute_args.actorId.split(".").join("/")}`
It would be nice to centralize this logic and to have it in Python on the renderer. But anyway, this means that I might write a get_request_url() for React renderer. - 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : I'd like to look at this together with @8lurry.
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : I didn't yet find how the Renderer.show_detail() can ask Lino to give the URL of the submit button. Our API in this domain is really a chaos...
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : I have the demo pages in publisher, but they are only root pages: where to add a link to them? And then the submit button doesn't yet work because it uses a hard-coded url. It should be 127.0.0.1:8000/admin/api/webforms/ContactRequestsWeb/-99999
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : todo: pm prep should add a publisher page for each webform.
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Instead of raising a Warning in get_permission(), we now have a new method get_datarec() on Action, which is overridden a first time by ShowInsert and once more in ShowInsertWeb.
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : But my idea (raise a Warning during get_permission()) doesn't work, it causes a series of side effects.
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Together we did it (Sharif guided me)
- 8 Monate, 1 Woche ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : @8lurry I'd like to show you my code tomorrow morning. I'm getting a red toast message, but I want it to say "You did this already from {}. Please try again later." instead of "Bad request <!doctype html> <html lang="en"> <head> <title>403 Forbidden</title> </head> <body> <h1>403 Forbidden</h1><p></p> </bo...
- 8 Monate, 1 Woche ago von Luc Saffre Antwort auf Luc Saffre about #6605 (A feedback form for collecting contact data) : Should the form open, but with all entry fields disabled? Or should there be a simple error message without opening the form? How should it look in publisher?
- 8 Monate, 2 Wochen ago von Luc Saffre Antwort auf Luc Saffre about #6605 (A feedback form for collecting contact data) (1 Antwort) : What should happen if the same IP address requests the contact form a second time? Wouldn't it make sense to show them the previous values? No, because imagine a public library computer being used by different people.
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) (1 Antwort) : todo: Rather than saying "IP address : Request to create a user account with this IP address already exists." after submitting, the whole webform should be disabled and have a message "You have already posted, let us process your request, please try again later."
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : According to this we can rely on the REMOTE_ADDR header for making webforms more or less bot-proof by accepting only one request per IP address.
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : I had the idea that the CreateAccount action should move from users plugin to webforms plugin.
- 8 Monate, 2 Wochen ago von Luc Saffre Antwort auf Luc Saffre about #6605 (A feedback form for collecting contact data) : No, it's not about these three fields, these three fields are for password verification, not for email verification.
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) (1 Antwort) : I had the idea that I should also move the fields verification_password, verification_code and verification_code_sent_on from User to WebForm. They are potentially needed for every webform request, and they are actually not needed for every user.
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Can webforms make sense for registered users? My first answer was yes, but meanwhile I say no. An authenticated user won't want to fill a contact request form, and if he wants to subscribe to a newsletter, he will go to his preferences.
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : The newsletter subscribe action is actually another use case of the webforms plugin. The current implementation isn't bot-safe.
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : todo: use bootstrap for styling?
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : No, FormData doesn't work for some reason (maybe because Django wants urlencoded form data?) I'm now using a URLSearchParams object. It's a fight!
- 8 Monate, 2 Wochen ago von Luc Saffre Antwort auf Luc Saffre about #6605 (A feedback form for collecting contact data) : Here is how a html form should post its data: javascript.info/formdata
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) (1 Antwort) : Aha, I now saw the difference between the sphinx-generated contacts form on SR and the one generated by Lino: the former submits the post data as "an=submit_contact_request&first_name= &last_name=&email=a%40b.c &phone=123 &message=" while my form uses JSON.
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : I'm experimenting with a local onsubmit function that manually calls fetch() and then returns false.
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Didn't need a new memo command, we just use the [show] command. The as_plain_html() methods in elems didn't correctly use format_html and mark_safe, which leaded to escaped html tags. Next step: after submitting the embedded form, it now displays the json response. A HTML form expects HTML as respo...
- 8 Monate, 2 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Next step: write a memo command that inserts our contact form into the body of a page(?)
- 8 Monate, 2 Wochen ago von Luc Saffre Antwort auf Luc Saffre about #6605 (A feedback form for collecting contact data) : We have a beginning of this in HtmlRenderer.show_detail(), but until now the only intended purpose of this is to test whether things work.
- 8 Monate, 2 Wochen ago von Luc Saffre Antwort auf Luc Saffre about #6605 (A feedback form for collecting contact data) : The right way to do this would be to render a Layout as a HTML form.
- 8 Monate, 3 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) (2 Antworten) : I now have a submit_contact_request action, similar to create_account. TODO: implement the contact form in publisher?
- 8 Monate, 3 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : medium.com/@sunilnepali844/handling-anonymous-user-sessions-in-django-a-complete-guide-78fb563a28b2
stackoverflow.com/questions/2387496/how-to-prevent-robots-from-automatically-filling-up-a-form
developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Form_validation - 8 Monate, 3 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Do we really want a separate plugin for this? Can't we have a contacts.ContactRequest action, similar to the existing users.CreateAccount action?
- 8 Monate, 3 Wochen ago von Luc Saffre about #6605 (A feedback form for collecting contact data) : Created new Ticket #6605 (A feedback form for collecting contact data).