Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I checked that no HTML code is generated by the hidden field:
I expect to see something like:
<input type="hidden" value="..." name="..." id="...">
So the question is. How can I use the Formulate hidden?
We can definitely talk about ways to make that happen (I have three solutions in mind). However, I'm curious about your use case. For everything I've built Formulate for so far, I've been able to avoid using hidden input field elements.
When I need to use a static bit of text, I use the "Text Constant" field type. When I need to generate a field value (e.g., when combining multiple fields into a single field), I use the "Hidden" field type and set the value on the server side. When I need to get something from the client side, I have so far only needed to set a cookie (that I then transfer to hidden field values on the server side).
Could you explain a bit about your use case so that I can be sure to offer better guidance?
thank you for your concern.
I developed a simple website that has a page with a list of products (www.mywebsite.com/products) . Every product has a link to a detail page (www.mywebsite.com/products/detail/id/1234) whose content is dynamic and is based on the product properties. That detail page has a form, created using Formulate, so the customer can use that form to ask for further detail. I would like to send the product Id (or better, the product name) as a field of the email just to know the name of the product for which the customer has requested information. I need to generate a hidden field with the product name as a value:
<input type="hidden" value="[product name]" name="..." id="...">
This is my use case. Do you think that is possible to do with Formulate?
It sounds like what you want is a hidden field, but you need not set it on the client side. You can set it on the server side with a Formulate submitting event. You can subscribe to it like this (e.g., from an ApplicationStarting event in a class that inherits from ApplicationEventHandler):
formulate.api.Submissions.Submitting += FormSubmitting;
Then you can set the value of the hidden field in that event handler:
/// Handles the form submitting event.
private static void FormSubmitting(FormSubmissionContext context)
// Set hidden field value in here.
Does that sound workable to you?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted