Forum Discussion
Hi PerBonomi,
You could add form markup to a custom component, and have it submit via AJAX to an endpoint .
This article has a code example that includes an Ajax form that submits to an endpoint:
Using the http.client Context Object to Integrate with a Third-party REST API
-Doug
Thanks Doug, but I'm not sure what to with that. Seems like an aweful lot of external code for a native Lithium form submission.
Thanks anyway :)
- PerBonomi10 years agoBoss
I feel like I want to create an endpoint that can "read" the data from a form submission, but I don't know how to do that.
If there were a simple example how to read a simple text input field's data on an endpoint, then I could work from there.
- irach158 years agoMaven
Hi PerBonomi,
did you find How to?
Can I use you idea? :-)
I'm trying to do pretty much the same...
Any code snippets mucho appreciated.
..........................................................
I also need to create a custom form, validate it and send response out of Lithium platform.
Anyone?
- DougS10 years agoKhoros Oracle
You should be able to use the http.request.parameters.name.get freemarker context object (see http://community.lithium.com/t5/Developers-Knowledge-Base/http-request-FreeMarker-context-object/ta-p/9323 for more info) to read the form parameters. You can look at the endpoint in that example I mentioned above to see an example of doing that.
Related Content
- 8 years ago
- 4 years ago