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 6 - is node_submit() needed when saving node?
Apache Solr : Filter results by minimum relevancy in drupal 6.x
How can I add the tracking number to the message the users receive?
How can I get the term id after using taxonomy_save_term?
Why can't my user access a certain page?
jqModal popup does not opens
Access alias of a node programatically using Drupal 6
When variable_get() can be used while variable_set() has not been used?
How can I redirect users to login page and then add item to wishlist?
How to change Ubercart status messages in Drupal?
How do you add Fedex SmartPost as a shipping option?
Group Checkboxes in webform in drupal
Drupal 6 - How can I disable comments on all nodes / content_types?
Webservice creation in Drupal 6.22
Authorize.net returning multiple deliminators
Drupal: What is wrong with my base_path to my libraries folder

Categories

HOME
cakephp
sendgrid
pdf
zeromq
magnific-popup
smarty
include
dot
q
paw-app
dxl
networkx
facebook-php-sdk
fancybox-3
nstableview
iron-router
highlight.js
fatal-error
apache-metamodel
crystal-reports-2008
amazonsellercentral
arabic
core-text
realex-payments-api
trading
xacml
atlassian-crucible
jaxb2
flink-streaming
bcd
protovis
windows-dev-center
environment-modules
bitbucket-pipelines
swift3.0.2
event-driven
uft-api
jna
sas-visual-analytics
avro4s
nand2tetris
node-sass
btrace
flickr-api
youcompleteme
hibernate-tools
clean-architecture
dotnetzip
drupal-6
diagnostics
np-complete
capacity
flow-control
linode
hittest
blacklist
watchconnectivity
medium.com
instant
infix-notation
home-directory
login-control
nsfilemanager
clang-static-analyzer
connect-by
superstack
tform
browser-link
execute
lib.web.mvc
t4mvc
python-3.2
simple-framework
libressl
content-length
coveralls
kcachegrind
cakephp-3.1
tableau-online
vstest.console.exe
bridge.net
device-orientation
apache-commons-net
clicktag
neolane
article
reactfx
android-2.2-froyo
mbr
fmod
google-cloud-save
tws
gwt-rpc
word-processor
venn-diagram
datawindow
onsubmit
dbproviderfactories
enter
amazon-appstore
ecl
wise
gin
jquery-ui-droppable
yagni
nerddinner

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App