I have a form on the portal which has some fields, those fields are all set to optional but on the portal they are required.
I don't know what makes them required.
There is no js code involved.
There are no business rules.
What should be the next thing I check ?
You should look for your Form in Dynamics. There in you can find Entity metada and it does have an option.
If not look directly under Form Options and there you will find Make All Fields Required
article for Reference
Related
I have a section Template'Section_library',in 'Section_library' i have a field 'first-name' who recuperate the value field from another section in my form so i used this expression
xxf:component-context()/root()/form/Section_TWO/mycontrol.
this expression not worked totally,the recuperation is done when i try to write in this field 'first-name'. i want a solution that automatically recuperate the value within any interaction of user.
I find this issue #3008 but i didn't understand it.
As of 2016.2, there is no reliable and supported way for code inside a section template to access information about the form it is used in. This is by design, but there are reasonable use cases that call for a section template being able to access things from the "outer form", and you're correct pointing to RFE 3008. For now I'd recommend you follow this issue.
I built two custom components using built-in CQ components. The components' JSP's, along with some custom javascript, have a line like below in order to leverage the built-in components (and their formatting, labels, etc.).
<cq:include path="." resourceType="foundation/components/form/dropdown" />
I have one each of my custom dropdown components on a form. I can mark field A and field B as both being required in their respective components' editor dialog. I can provide required messages so that when either field is blank and the form is submitted, I get a message that the fields are required (with my custom messages). However, what I really want to do is hide or disable field B based on the value supplied in field A. I'm handling this manually via jQuery. However, this of course presents a problem on validation. I want field B to be NOT required when it is hidden/disabled and for it to be required when it is enabled/visible. Since the showing/hiding is done client-side, the server-side validation has know knowledge of the change and still expect a value to be provided for field B.
I'm been trying to poke around in the CQ Widgets API to find if there is something I can do on the client side to set/unset the required property so that when the form gets posted it is handled correctly. I'm guessing that there isn't since the validation seems to be happening on post instead of client-side.
Any ideas/thoughts/options?
It turns out that the link from my comment gave me the idea that I can have custom server-side validation for my form, I just wasn't sure how to connect it to the field. It turns out that all I had to do was create a servervalidation.jsp file in my "B" component. CQ will see the servervalidation.jsp and automatically invoke it for my custom component.
I was then able to examine the submitted value of field "A" (by getting the parameter from the request object) and doing some other custom logic for my needs.
I was then able to optionally do this:
FieldDescription field = FieldHelper.getConstraintFieldDescription(slingRequest);
FieldHelper.checkRequired(slingRequest, field);
this question might be a bit special. I am using this Joomla 2.5 extensions to give authors the abilty to add Attachments to articles: Joomla Attachments
The extension renders an input field called "description" in a backend form to insert an file description for the provided file. Unfortunately it´s not taking HTML tags which I need. By saving the form it seems a strip_tags() or preg_replace() or something similar cleans the input. I combed through the code of the attachments extension but couldn´t find a place where the input is cleaned or saved.
To hopefully stay in the Question + Answer rule of Stackoverflow:
Is there a class which extensions inherit from the Joomla Core to save form data to a DB-table ( which also could be responsible to clean and validate user input )?
thanks for any idea,
tony
You should see how the field is defined first:
1. Form definition
look into the
administrator/component/yourcomponent/models/forms/somename.xml
there you could find a form definition, if so it will also specify the field type: depending on the type there are several available filters; for example the default textarea will strip html, and you need to set
filter="raw"
in order to enable it. see http://docs.joomla.org/Standard_form_field_and_parameter_types for a list of fields, click and you can find the available format options.
2. model
If the model inherits from JModelAdmin or JModelForm or other JModel* it will automatically handle binding of the forms' data to the database, look for the Save function which should receive the form $data.
3. more
There are at least another dozen possibilities. If the above didn't help, try finding the form: possibly you could find it just by looking at the markup. Once you have the form, check the following fields:
option
task
view
This should help you find the php code that is invoked based on the form:
if view is set, maybe in ./views/someview/view.html.php you could find the saving logic.
if task is set, look for a function with the same name in ./controller.php
if task contains a ".", look for the controller in the ./controllers/ folder.
if option is not the name of your component, your component is sending the data to another component for saving, and most likely set a return-url
How to add extra fields in Joomla2.5 registration form? I am using profile plugin but i also want to change the order of the fields. Any Suggestion?
Copy the profile plugin and change it to do what you want, then install it and unpublish the old one.
You can add additional fields to the registration form by changing the database and a core component file.
First of all take a look of components\com_users\models\forms directory and there is a XML file called registration.xml. This is the file joomla creates the registration form fields. I hope you can understand this file and add what ever the necessary fields you want.
And after that check out your data base table called #__users and add the extra fields you want. (ex: if you want to add Telephone number add filed calld tp_no). And make sure to use the same name that you use in XML file "field name" for the database table column as well.
I imagine you are looking for something like this?
http://extensions.joomla.org/extensions/access-a-security/site-access/authentication/14303
Probably the safest solution in the short and long term. I've not used it but it looks like it does what you want and from an interface rather than changing hard code.
There is manual how do it. Turn on subtitles visit http://www.youtube.com/watch?v=a6xsKLiXF40
a Microsoft CRM 2011 question. Given the following parameters:
An entity schema name (i.e. opportunity, new_customentity)
An entity guid
A CRM organization base url (i.e. http://myhost.com/ORGNAME/)
How can I build an url to point to the main (or "default") form of that record?
I can tell a pattern in form urls, but some querystring params are pretty obscure and I wouldn't know how to reuse them for any other kind of entity. In addition, version 4.0 had specific URLs (/sfa/, etc) for system entities. It doesn't seem to be the case anymore.
Any help would be appreciated - thanks.
(additional tags welcome, I cannot add them.)
According to MSDN, the format would be:
http://myhost.com/ORGNAME/main.aspx?etn={ENTITYNAME}&pagetype=entityrecord&id={ENTITYGUID}
Replace {ENTITYNAME} and {ENTITYGUID} with your values.