Validating a year field
|
Posted
#70463
(In Topic #14908)
|
|
|---|---|
|
Community saint |
My URL is: Code
http://xxxxxxxxx.com/cms/cms_catalogues/add_entry.htm?catalogue_name=image_galleries&category_id=18&keep_session=4715205&redirect=http%3A%3Aslash%3A%3Aslash%3Axxxxxxxxx.com%3Aslash%3Acatalogues%3Aslash%3Acategory%3Aslash%3Aimage-gallery%3Aslash%3Aportraits.htm%3Fcatalogue%3Dimage_gallery%3Aamp%3Akeep_session%3D4715205xxxxxxxxx
I tried creating a form-field filter in /data_custom/fields.xml as follows: Code
<qualify pages="cms_catalogues" types="add" fields="Year painted">
Am I even close to getting this to work? Also, what would I use for the possibilitySet to make sure I get a year starting with "19" and containing all numbers? Thanks for any help. Bob |
|
Posted
|
|
|
ocStaff (admin) |
The possibilitySet value list would have to be 100 items long to work for what you wanted, we don't have support for any kind of regular expresion/wildcards here. For it to be a number, just make it a numeric field. If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
Silly that I didn't make the year an integer value since I had changed another field to to be a dropdown menu. How much overhead is there in processing a possibilitySet with 90 to 100 entries? Bob |
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
Thanks for your help. |
|
Posted
|
|
|
Community saint |
That should be a trivial enhancement that can force type conversion where explicitly specified while maintaining comparability with existing xml filters.
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Community saint |
Where do you find the field number? Is it only available when Short URLs is disabled? Bob |
|
Posted
|
|
|
Community saint |
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Community saint |
|
|
Posted
|
|
|
Community saint |
OK, the correct answer is: click on "edit this" and view the html of the edit page, and search for label for="field_ and that will take you directly to the fiend number and its name. Repeat search for each field as required.
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Community saint |
Bob |
|
Posted
|
|
|
Community saint |
Code
fields.xml: not well-formed (invalid token)
This is the validation code which I copied from above, adjusting the field: Code
<qualify pages="cms_catalogues" types="ad,_ad" fields="field_45">
Can anyone point me in the right direction? Thanks for any help. Bob |
|
Posted
|
|
|
Community saint |
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Community saint |
Made that change and no longer getting the XML warning. But the field is still not validating. Below is the relevant source from the catalog entry page: Code
<td id="required__field_45" class="dottedborder_barrier_b_required">
So "field_45 is correct but I was still able to enter a three-digit year. Below is the corrected validation code: Code
<qualify pages="cms_catalogues" types="ad,_ad" fields="field_45">
Any thoughts? Bob |
|
Posted
|
|
|
Community saint |
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Community saint |
At least, that's what I am trying to accomplish. Bob |
|
Posted
|
|
|
Community saint |
It sounds like the its not even associating the xml to the right field. So while the field name make be correct, maybe its the page name. How did you determine the page name?
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Community saint |
Copied from Chris's first post in the thread. He seemed to be correcting my initial take on it. Bob |
|
Posted
|
|
|
Community saint |
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Community saint |
Maybe Chris can weigh in when he gets a chance. Bob |
1 guests and 0 members have just viewed this: None
Control functions:







