I need the form to display a checkbox field, when the user selected an image for the upload in an image Form Field and make this required.
The User has to confirm, that he claims the rights on that picture.
I've already tried to make a custom Validator, but i think this won't work for that scenario.
Thank you
If i understood well, 2 solutions:
you do this via html with an . The user have to check this after uploading his picture. If you don't checked the box, it won't submit the form.
With a boolean in your entity, you set it to required=true and you will display it like any other field. But, the result in the database will always be true.. ( useless )
Related
I am creating an app with flutter. I have a form that have some fields like name, before_edit_images, after_edit_images etc. It has dynamic form fields.
I simply want to upload images with rest of form fields when form is saved. Like the image should have reference to which field it has been uploaded from.
I have check simple image uploads, But i need to send form field name against which the images are being uploaded
Any help will be appreciated. Please help me with this.
Thanks
Yes it is possible, you just need to turn the image into a base64 String, and then you can use it as any other form field.
I have a long form that an user has to fill. After the user has clicked submit, I have to show a page with the information the user has filled in the form so that he can check that everything is correct before doing any further processing (i.e., he has to press another submit button or a back button if he detects an error).
Is there an easy way to do this? Is there a better way than creating a new form with hidden values equal to the values submitted in the previous form?
Would it be okay if I just store the information in a session variable and then process it if the user confirms?
You could skin that cat many ways, here's a couple of ideas:
Add a non-mapped confirm input (like a checkbox) to your form. On initial form render with no POST, hide the input. When you get a POST, show the checkbox input & some additional information (please review your data & check to confirm all is OK etc). Don't validate the form or save your data until the confirm input has been checked. You don't need to mess about with hidden fields, the one form will do the job for you.
Save the entity and give it a property e.g. isApproved, that way you can show the data easily & if the user needs to edit, re-use your form. When the user approves the information set isApproved to true. Don't perform any actions on any entities that have isApproved == false. Cons are you then have to manage an isApproved state for an entity.
just created a from using "custom form" with input fields like - "Title", "Caption", "Alternate Text", and a button called "Submit". After submit i need to show the entered input fields as an output in another page. How can i achieve this.
Pls guide me with step by step solution. I am not a developer, Im just a designer
So, you created a custom type and added those fields.
Then created a custom form with this type.
You can configure the form to redirect after submit thanks to an textbox that allows to use Tokens, i.e dynamic information retrieved by the content.
Thanks to this, you should be able to redirect to the display url of the content.
To display the output the way you want in another page, you need to make an override of your content in your theme.
You can enable the 'Shape tracing' feature to generate this alternate view of your content and then modify it as you want.
Can anyone think of a reason why a text box is missing from my EditView?
It's a URL field for a Twitter profile that builds a URL using the Twitter username.
There's an identical field for LinkedIn next to it that doesn't use this URL builder, which has the text box as expected.
The Twitter field was originally just text, without a special URL.
Any ideas?
Thanks
It is not editable because it pulls text from another field to calculate the value. As soon as you make it this type of field, you cannot directly edit it.
I had assumed that I could use a single field, holding the username, and display the URL using a rule (to add http://twitter.com to the front). It seems you must use 1 field for the username, and 1 field to hold the calculated URL
Is it really necessary to also filter or clean a form's select element since the input is not actually entered by the user but rather the user selects from an already entered options?
Note form submission method is POST. Thanks for the reply.
Yes. You're assuming that the user can't alter it, when in reality they can. Any DOM inspector would allow a user to simply go in and change the values of your options, or even add new options. Always, always validate user input on the server-side, for everything.