tomolimo / formvalidation Goto Github PK
View Code? Open in Web Editor NEWGLPI plugin to provide form validations
GLPI plugin to provide form validations
Maybe it's a beginner's question about using the plugin.
I'm trying two issues: block the user from editing the category field; The second issue concerns blocking the editing of the description on the attendant's page.
I'm not able to do this or it's not possible to do this via the plugin?
Hello
How to manage a field which has to fill with alpha, then date, then alpha?
like (in regex)
^test(19|20)\d\d(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])[[:alpha:]]$
In this case the field must contain : test20190101xyz (for instance)
when trying to put this formula :
which is normal because no '#' to indicate the current field.
But I wonder where to put it .
The idea is to be able to validate a form with some data coming from another form.
Exemple: prevent solve of tickets if some custom fields are not input.
Hey I get this error when trying to install it:
error creating glpi_plugin_formvalidation_fieldsSpecified key was too long; max key length is 767 bytes
*** PHP Notice(8): Undefined variable: DB
Backtrace :
plugins\formvalidation\hook.php:29 PluginTimezonesToolbox::userErrorHandlerNormal()
inc\plugin.class.php:1283 include_once()
inc\search.class.php:5445 Plugin::getAddSearchOptions()
inc\search.class.php:5188 Search::getOptions()
ajax\searchrow.php:52 Search::getCleanedOptions()
inc\search.class.php:1873 include()
inc\search.class.php:79 Search::showGenericSearch()
front\ticket.php:56 Search::show()
During EDIT mode to be able to select the new tinyMCE text editor used in GLPi 9.1
Hello
How to duplicate validation from one instance to another instance (Ex : from dev towards prod) ?
Thanks
Is there a possibility of updating this plugin to version 10? Or is there anything we can do to make it work on version 10?
With IE10 at form validation, the background overlay is not removed after closing alert box
*** MySQL query error:
SQL: SELECT 'MoronO' AS currentuser,
glpi_plugin_formvalidation_pages
.entities_id
, glpi_plugin_formvalidation_pages
.is_recursive
, glpi_plugin_formvalidation_pages
.name
AS ITEM_0
,
glpi_plugin_formvalidation_pages
.id
AS ITEM_0_id
,
glpi_entities
.completename
AS ITEM_1
, glpi_plugin_formvalidation_pages
.itemtype
AS ITEM_2
, glpi_plugin_formvalidation_pages
.id
AS id FROM glpi_plugin_formvalidation_pages
LEFT JOIN glpi_entities
ON (glpi_plugin_formvalidation_pages
.entities_id
= glpi_entities
.id
) WHERE ( 1 ) AND ( (glpi_plugin_formvalidation_pages
.itemtype
= 'aa') ) ORDER BY ITEM_0 ASC
Error: Unknown column 'glpi_plugin_formvalidation_pages.itemtype' in 'field list'
Backtrace :
inc\search.class.php:921
inc\search.class.php:97 Search::constructDatas()
inc\search.class.php:80 Search::showList()
plugins\formvalidation\front\page.php:10 Search::show()
I'm having an issue where in the knowledge base if I click on the next page it comes up with "no item found". If I change the display number to something higher than the number of docs it will display them all.
FormValidation: add input type radio to selector
Description :
Forms are no more displayed by the "Forms" tab of the plugin setup, so it isn't possible to define formulas or mandatory formulas any more. The message "No items found" is displayed instead.
However the number of forms that should be displayed is still visible in the tab.
Expected : the "Forms" tab should display forms instead of "No items found".
Affected versions : at least since glpi 9.5.3
sql-error
[2021-03-04 07:14:07] glpisqllog.ERROR: DBmysql::query() in /var/www/glpi/inc/dbmysql.class.php line 306
*** MySQL query error:
SQL: SELECT glpi_plugin_formvalidation_forms
.id
AS linkID
, glpi_plugin_formvalidation_forms
.name
, glpi_plugin_formvalidation_forms
.pages_id
, glpi_plugin_formvalidation_forms
.css_selector
, glpi_plugin_formvalidation_forms
.is_active
, glpi_plugin_formvalidation_forms
.is_createitem
, glpi_plugin_formvalidation_forms
.use_for_massiveaction
, glpi_plugin_formvalidation_forms
.name
FROM glpi_plugin_formvalidation_forms
WHERE SELECT DISTINCT
= 'glpi_plugin_formvalidation_forms.id' ORDER BY glpi_plugin_formvalidation_forms
.id
Error: Unknown column 'SELECT DISTINCT' in 'where clause'
Backtrace :
inc/dbmysqliterator.class.php:95
inc/dbmysql.class.php:858 DBmysqlIterator->execute()
plugins/formvalidation/inc/form.class.php:187 DBmysql->request()
plugins/formvalidation/inc/form.class.php:247 PluginFormvalidationForm::getDataForPage()
plugins/formvalidation/inc/form.class.php:133 PluginFormvalidationForm::showForPage()
inc/commonglpi.class.php:637 PluginFormvalidationForm::displayTabContentForItem()
ajax/common.tabs.php:92 CommonGLPI::displayStandardTab()
{"user":"21@minerva"}
hello @tomolimo ,
i would like to ask you something related to this plugin.
how to i add new forms to validate? because when i try to add new forms the + button is grayed out.
i would like to ask you to add a validation for solution description field. to validate empty solutions / random type solutions.
is it possible?
Description :
Forms are no more displayed by the "Forms" tab of the plugin setup, so it isn't possible to define formulas or mandatory formulas any more. The message "No items found" is displayed instead.
However the number of forms that should be displayed is still visible in the tab.
Expected : the "Forms" tab should display forms instead of "No items found".
Affected versions : at least since glpi 9.4.0
Good day.
There is a way for tracking mail is sent immediately? I'm having trouble with this. I come from the version 0.83 and earlier did not have this problem. I do not know what happens or if any solucicón.
I'm using glpi 0.90.1.
Entity> Notifications => Delay for sending mail notifications = 0
Notifications Default = Yes
Automatic actions>
Frequency = 5 minutes
Status = Scheduled
Run mode = GLPI
Timeframe = 0 -> 24
days = 30
Posts maximum = 50
If I can help ... Many thanks in advance.
Best regard.
FormValidation: can't select error area when page is reduced
The idea is to use the formulas to validate functional behavior on PHP side to be able to prevent some side effects like massiveactions that may break the business rules:
ex: if you decide that a solution must provide the solution type during save. With the plugin it's easy to setup for the ticket forms, but you can't prevent the massiveactions to set a solution without a type.
Hello!
How to translate your plugin? Do you have a directory on website Transifex.com ?
can't see complete list of fields, limited to $_SESSION['glpilist_limit']
Even if the the fields are not under validation!
see:
Root cause: the DOM is exactly the same on both side, and the CSS selector for the 'mandatory signs' of the fields on the left will return two <td>
instead of only the one from the left.
Must change the way CSS selectors are saved into the DB to be able to separate such cases.
Hi,
FormValidation plugin doesnt work when I already have Generic Objects Management Plugin installed on my application.
Installation works fine, but I do not see "Form Validation" option in the Menu -> Setup. Although I can see Form Validation tab when I click on "My Settings".
I tried on two different machines.
Anybody facing same issue?
Hi,
My environment is characterized by the following versions:
When the Mail Analyzer plugin is enabled and I try to install Form Validation, the following error is displayed with GLPI in debug mode:
Fatal error: Cannot redeclare arTableExists() (previously declared in [redacted [path]\glpi\plugins\mailanalyzer\hook.php:4) in [redacted [path]\glpi\plugins\formvalidation\hook.php on line 35
In addition, the following is displayed as well:
PHP Notice: Undefined variable: DB in [redacted [path]\glpi\plugins\formvalidation\hook.php at line 29
Everything else seems to function error-free, at least so far.
Question...
Good afternoon.
How could avoid creating a ticket in a wrong entity?
It happens that I have a tree or entities for which users have no permissions to a particular profile.
However if changed profile (users who have two or more profiles) lets you create tickets in a different entity. The application displays and it indicates that the entity is in tree structure but users generally are not fixed and if they find the selected category. That's when the ticket is in the state (tree structure) but the category is another entity. Therefore creation was wrong.
If I do not explain adequately. Basically I need to know if I can restrict all entities that have access to a user profile to see.
Cordially, Thanks
can't input >, <, >= or <= in some formulas
Hi,
this plugin was just what I was looking for but unfortunatly it doesn't work on sub-entites.
I set-up the preconfigured pages and forms to handle my own validations. It's working fine with a user set to root entity but if I use a user attached to a sub-entity the validation is not run.
Do you know how to make it work ?
I also tried to create a new page directly link to the sub-entity but I don't find any way to add forms into it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.