In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the method required to modify the custom form options of dream weaving dedecms. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.
Dream weaving dedecms custom form options required how to modify?
Method 1: First we need to use a php code to determine the validation required options.
1. Let's start by adding the following code under line 40 in the plus/diy.php file:
The code is as follows:
//add required field to judge if($required!= ''){ if(preg_match ('/,/',$required)) { $requirements = explore (',',$required); foreeach ($requirements as $field){ if($field==''){ showMsg ('with * is required, please fill in', '-1'); exit(); //phpfensi.com} } }else{ if($required==''){ showMsg ('with * is required, please fill in', '-1'); exit(); } }/end
2. After saving, find this line of code on the form page.
The code is as follows:
`````
Below this line of code, add the code:
The code is as follows:
````
Method 2: I ended up doing it differently, adding a JQ and a JS to your form page:
The code is as follows:
This js is:
The code is as follows:
*
Note: Part of your form ID(if not, please add it in the form) and required ID.
About modifying the dream weaving dedecms custom form options required method to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.