drupal-6


drupal 6 - unset previously set cck field validation error messages


How can I unset previously set cck field validation error messages? Some module is setting the form validation messages, that I want to override. In my case, it's cck_phone module.
Something like form_unset_error($field['field_name']) to unset the error messages?
one way to unset the error is unset($_SESSION['messages']['error']['cck field']).
But i dont know whether it is the best way to do or not .
You need to delete the errors then clear 'drupal form static cache' if it is the last error.
form_set_error(NULL, '', TRUE);
in order to reset the state of the form. e.g.
$found_error = array_search('This e-mail has already been taken by another user.', $_SESSION['messages']['error']);
if ($found_error !== FALSE) {
unset($_SESSION['messages']['error'][$found_error]);
if (sizeof($_SESSION['messages']['error']) == 0) {
unset($_SESSION['messages']['error']);
form_set_error(NULL, '', TRUE);
}

Related Links

drupal_get_form : Manual call to render a form isn't working
Query in Override of node.tpl
Design a site in drupal: General Overview
use drupal hook_nodeapi
Creating a CCK record in a MySQL database
Aggregate various feeds and display them as blog entries?
hook_menu giving 404
Drupal 6 backport of Drupal 7 admin-bar and overlay?
Adding extra multiple fields in Drupal(6.19) comment form
How to modify the HTML tag in Drupal 6?
working with forms and ajax in drupal 6
How to do form validation in drupal?
Drupal: Problem with installing Drupal6
How to conditionally hide a field in a drupal view?
toggle between views in drupal
How to integrate a non-node module into Open Atrium as a feature

Categories

HOME
maven
isabelle
heroku
tesseract
at-command
maven-3
electronics
packages
umd
ebean
podio
vifm
tostring
serilog
propel
beyondcompare
openedx
visual-composer
swingx
ehcache
core-text
realex-payments-api
nhapi
tooltipster
rst2pdf
file-rename
vsts-build-task
windows-dev-center
textmate
preconditions
email-templates
elmah
google-closure
glew
outlook-api
http-redirect
total-commander
apple-news
outlook-2013
qsslsocket
worksheet
boost-multi-index
ionicons
integrity
snmptrapd
qtwebview
vtigercrm
quartz-composer
messenger
color-picker
measures
asp.net-4.5
mathematica-frontend
xml-attribute
pagedlist
blackberry-10
tform
browser-link
msys
lemon
google-places
ruby-2.2
feedback
tarjans-algorithm
cakephp-3.1
apache-commons-net
directoryservices
typo3-neos
oam
listings
opcache
easy-install
xamlparseexception
jquery-knob
nsnetservice
dbproviderfactories
cufon
doh
spyware
blackberry-playbook
cinema-4d
pyinotify
locate
asp.net-mvc-areas
web-application-design
perfect-hash
thunderbird-lightning
privilege
putchar
dbisam

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App