Mandatory field

41 views
Skip to first unread message

Vincent Arsenault

unread,
Feb 27, 2024, 2:37:13 PMFeb 27
to AtoM Users
Hi, 
It sure have been discuss before, but can't find it anywere. 
I'm looking to choose what field are mandatory when adding a new Archival descriptions.
I don't want to add new input field, just make some that are already in place mandatory.
thanks for your help and sorry if it had been discuss previously.

Cheers,
Vincent

Dan Gillean

unread,
Feb 27, 2024, 3:12:35 PMFeb 27
to ica-ato...@googlegroups.com
Hi Vincent! 

Fields that are considered mandatory within the original standard (e.g. ISAD(g), RAD, DACS, Dublin Core, MODS, etc) are marked with an orange * asterisk. If you do not fill in these fields, a warning at the top of the page will be displayed to authenticated users after saving. Note that this is never shown to public users. 

AtoM itself however, is very permissive - no fields are mandatory. You can actually open a blank new description entry template and immediately save it with no data at all, and it will save. This was a very early design decision made, to respect the user - as an international, multilingual, open source application used very differently by many people in very different contexts and use cases, we wanted to allow users the most freedom, while still offering standards-based guidance. There are sometimes very good reasons to ignore the "mandatory" requirements as outlined in some standards, and while we will inform users of how the original standard intended the information to be represented, we do not go so far as to prevent users from adding - or omitting - whatever they want, so long as it won't break the application. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/e7e5f40a-3c23-4e24-97ba-ca01934c7465n%40googlegroups.com.

Vincent Arsenault

unread,
Feb 27, 2024, 3:18:52 PMFeb 27
to AtoM Users
thanks, 
Is there a way to add field to the mandatory one. I want to make sure that some field that are not mandatory by default are filled in. 

thanks for helping,
Cheers,
VIncent

Dan Gillean

unread,
Feb 28, 2024, 8:29:43 AMFeb 28
to ica-ato...@googlegroups.com
Hi Vincent, 

There is always a way, but there's not an easy way if you are not a developer ;)

I am not a developer, so unfortunately, I can only point you in the right direction - fully describing how to implement this in code is beyond the level of assistance we can freely offer via the forum. 

However, for general development resources, see the wiki: 
There you'll find general resources on Symfony 1.x development (in the Community Development Recommendations page), Entity Relationship Diagrams of the database, tips for contributing, information about our code repository, and more. 

In terms of the code, I would suggest that you study one of the standards based plugins to see how we have implemented things. 

For example, in the ISAD plugin, when the view page is rendered, you can see that a whole bunch of of the mandatory fields are passed to a $validatorSchema variable, to be checked whether they should issue warnings or not when the page loads, starting at line 78 down:
It looks like the errors that are found by this action are shown using this slot on the view page: 
Meanwhile, the edit page template has a set of elements used to indicate required fields, and set the warning if they are not populated, as seen on the title, here on line 51, and elsewhere in the same file on other elements: 
And the edit actions appear to have some kind of field validator function in place, as in this line example: 
I would recommend that you keep exploring one of the standards-based plugins to see how the code is organized and used, so you can trace how mandatory fields are indicated and passed to validation actions so a warning can be returned if the criteria for success is not met. 

If you have a specific question about this that a developer might be able to answer, let me know and I will see if I can get some further input for you. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


Reply all
Reply to author
Forward
0 new messages