BunnyBomb
Forum Replies Created
-
Hi Schnappinator,
I’m afraid I don’t understand what you are describing. You can hide any area with the code I gave you, by putting the <div> in the correct location and using the correct field validation.
If you are trying to let users manually show/hide portions of your form (i.e. by clicking expand/collapse somewhere on your form), I believe you can do that with CSS. A script it not necessary.
Best of luck
Bunny
Hey there – I’m glad this was helpful for you.
I don’t think I can help with the other two issues you have though sadly, as they don’t relate to showing/hiding fields with jQuery ??
(1) The first question relates to the minlength attribute, which does not exist with HTML5 or Contact Form 7.
I’m no expert, but I think normally in HTML5 you add this kind of validation into the script handling your Form (it’s easier), but in this case the AJAX script lives in the Contact Form 7 plugin itself. I suggest you raise it as a question for the CF7 writers, they may be able to help you with a work around for their plugin.
(2) Sounds like a CSS formatting issue, as opposed to a functionality issue. I suggest posting up your CSS in a separate thread for someone to take a look at and help you with.
Best of luck getting it sorted!
Forum: Plugins
In reply to: [TDO Mini Forms] [Plugin: TDO Mini Forms] Does this plugin exist anymore?Oh I see, well that’s a bummer.
That’s the problem with making things idiot proof, some hacker will find a way to make himself into a better idiot.
Thanks for the reply ??
I don’t know how to do it though – any ideas?
Forum: Plugins
In reply to: [WP ADA] [Plugin: WP ADA] Bug in Admin PanelTo correct this issue in your next release, you need to do this:
-
Line 155 in function “site_colluns” in pet_post_type.php
Please change the line from this:
$column_headers['custom_posts'] = 'Publica??es';
To this:
$column_headers['custom_posts'] = 'Publications';
- Line 174 in function “site_colluns_gerencia” in pet_post_type.php
Please change the line from this:
$custom_column = "<th style='font:normal 12px arial'>Nenhuma publica??o</th>";
To this:
$custom_column = "<th style='font:normal 12px arial'>No Publications</th>";
Thanks.
Further to the above…
Instead of taking away the
upload_files()
capability in order to hide a menu, what you should do is have your tick-box call a conditional statement to just cosmetically “hide” the menu.I’m no expert coder, but I do know that you can achieve this by:
// Remove menu items for users below Admin level add_action( 'admin_init', 'my_remove_menu_pages' ); function my_remove_menu_pages() { // If the user is not an administrator then... if(!current_user_can('add_users')) { // Remove the "Media" Menu from the list remove_menu_page('upload.php'); } }
I’ll be using this code in my installation, until such time as your tick-box idea does something other than taking away the capability.
Cheers
BB
Forum: Fixing WordPress
In reply to: Editor does not have permission to upload files?Found the culprit –> here
Forum: Fixing WordPress
In reply to: Editor does not have permission to upload files?I also tried this:
4. Changed my theme to TwentyEleven with no Plugins enabled.Still no joy.
Forum: Fixing WordPress
In reply to: Need advice on how to edit from front-endMaking as resolved, as I’ve decided to go in a different direction using the White Label CMS (ergo cleansing the back-end to look less scary, making front-end customisation not required).
Forum: Fixing WordPress
In reply to: Re-ordering the Admin Menu – made an attemptGot it! Logic wins again.
Forum: Fixing WordPress
In reply to: Re-ordering the Admin Menu – made an attemptBah…I know what I have to do, just don’t know how to do it. Logic tells me I need the if statement for the “if user isn’t an editor” part around both the menu_order_filter function and the add_filter call. Somehow…
Forum: Fixing WordPress
In reply to: Um…why does it say Publica??es in my admin panel?Never mind, I found the culprit.
The one plugin I needed for a pet rescue website (called the ADA Plugin) seems to bork up the language in my installation. When I turn it off, the problem goes away….damnit.
Quite honestly, I’ll just add this to the list of problems I’ve had to fix with the ADA Plugin, for lack of a better alternative…this thing needs the mother of all re-writes imo.
Hrm, well I noticed a typo in my step 5 above. It should say this:
<!-- Add jquery script to support Conditional Forms--> <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/1.7.1/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/hidefieldsScript.js"></script>
The filename I gave for jQuery 1.7.1 was slightly borked. Here I am telling folks to “download this file here” then I give it a different name when I get to the step that needs it. Good one Bunny, great stuff….
Glad you got it working though ??
You’re very welcome!
I found the same when I looked yesterday; lots of posts 1-2 years old with people asking how to do this, but no detailed answers with examples given. I wanted it for myself and had a free afternoon yesterday, so went digging.
As for the 1.7.1 thing, that’s just me following the filing conventions that WordPress seems to use to file scripts. I noticed it gives each a folder with the version number on it and (to be quite honest) I figured….I better do that just in case it means something ??
I’m sure it would work fine if you put it into plain old /js folder, as long as your call to it (in my step 5) looks for it there.
Anyhoo, really glad this was useful for you ??
Forum: Plugins
In reply to: [HungryFEED] [Plugin: Hungryfeed] XML feed cant be parsed.Crashnet, I’m posting here because the other posts you made about this are too old to reply to.
You said you were looking for a way to have conditional form fields with Contact Form 7 and it looks like you posted just about everywhere to find the answer! I’m sure you found the answer by now, but if not I’ve just made a post with the answer for you here.
Kind regards
-
Line 155 in function “site_colluns” in pet_post_type.php