How to add/remove field "required" condition while saving the channel data?
I want to run validation based on input received. Using EE verstion 2.9.2
The required attribute is managed in the same interface where you created the field.
Let's say you were trying to change the field "Body" in the fieldset named "News", you'd want to drill down on the control panel as follows:
Admin > Channel Administration > Channel Fields > News > Body
In the resulting page toggle the radio button labeled "Is this a required field?"
First you have to remove the required option from EE admin for that custom fields as described by AllInOne.
For validation you have to develop a custom extension with entry-submission-ready hooks.
Check this link how to develop extension in EE.
Related
I try to create custom content part with following specification.
I need to add list of items in database with same editor template view page of driver.
I want to include one form with required fields with an add button, by using this add button I want to add more number of rows with given field values in database.
I have checked Orchard documentation in this link, they provide sample with single item add in editor template page. In my case I need to add multiple items in editor page.
In display view page of driver, I want to retrieve collection of data from database and rendered in display view page.
Please share some details for this.
Thanks,
I have created a form using Kentico on-line form and applied the built-in "required" validation on it. Whenever a textbox is empty then a required validation is shown. Now, I have entered a value in the textbox and press tab from the keyboard but the required message does not disappear. I want to remove or hide the message from the form when the user enters a value in the text box before the submit button is clicked.
How to resolve this issue?
I don't recall this being something that Kentico handles out-of-the-box. You'll most likely need to add some custom client-side script for this. Typically - where I work, at Ridgeway - we use custom layouts for forms, as the standard layout is fairly table-rich.
I want to build a custom webform using webform module in drupal 7 but I want to use custom fields as form fields. Is there a way to do it?
To create your custom field as per requirement follow this awesome link.
http://jamestombs.co.uk/2012-09-24/create-new-webform-element-drupal-7
Cheers!!!
You just have to create a new piece of Webform content by going to Content > Add Content > Webform. Once you make your title, body, etc, click "Save" and you'll be taken to the next step of creating your form fields (called "Components"). In the components area, you can add whatever type of field you'd like, and all the submitted data will be stored in the "Results" area for that piece of content.
I have a radio button group that gets it's values using an #Dblookup. In addition to the name to appear in the radio button group, the document also has a field to determine if another field on the xPage should be displayed or not.
If the field is displayed then it should be required.
I can do the conditional validation just fine in SSJS using an #DbLookup to lookup the document selected in the radio button group.
But I would like to be able to do it CS so it is faster and so it looks like my other validations. Is there anyway to do this?
If a field is not rendered then the node will not exist in the DOM. Your CS javascript would need to examine the DOM and look for the node, normally by looking for a specific ID. As Xpages changes the ID's sent to the browser your validation function would either need to be computed so it would know what ID to look for or you would need to look for it in some other unique way ( like add a css class name to just that field and then do a DOM search for nodes with that class name )
Once you can determine if the field has been rendered then you can run your usual CS validation routine against the other field.
If you're using client-side validation throughout your app, setting the required property on the field should achieve what you need.
If not, it may be worth looking at the Extension Library Dojo Validation Text Box. All the Extension Library Dojo control run client-side validation, even if validation is set as server-side at application level. Bear in mind that for the Dojo Validation Text Box, just setting the required property is not enough. You need to add more specific validation.
After that, the key is to ensure the partial refresh event on your radio group is set to skip validation. I haven't tried, but I believe that should achieve what you need.
I am using the people picker user control of SharePoint in my aspx page. I have set the AllowEmpty property of people picker control as false.
But, still the required field validation is not occurring for the control. I don't want to use a required field validation control explicitly for validating this. Any insights?
Regards,
Raghuraman.V
In order to enable/disable validation for Entity Editor based controls (like People Editor) the following properties should be specified in combination:
AllowEmpty - represents whether an empty entity is allowed
ValidatorEnabled - represents whether a Validator is enabled
So, in your case to disable empty values, ValidatorEnabled="true" should be provided also like shown below:
<wssawc:PeopleEditor
AllowEmpty="false"
ValidatorEnabled="true"
id="userPicker"
runat="server"
SelectionSet="User,SecGroup"
/>