Forum Replies Created

Viewing 15 posts - 76 through 90 (of 126 total)
  • Author
    Posts
  • in reply to: Changing the site name #18567
    patdundee
    Participant

    Hi Ally

    Many thanks. I realised that about 30 minutes ago and used https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ script which sorted the issue out 🙂

    I did originally run a search and replace script within phpmyadmin but that obviously did not change the serialized fields.

    Many thanks for replying.

    P.S. I will drop another coffee over for you guys soon 🙂

    Kind regards
    Patrick

    in reply to: required fields #17940
    patdundee
    Participant

    Hi Ally

    I have solved the issue 🙂

    Changed the code in each section from this


    if (!$element->getForm()->getElement('iphorm_13_4')->isEmpty()) {

    To this for 13_4


    if (!$element->getForm()->getElement('iphorm_13_4')->isEmpty() && !$element->getForm()->getElement('iphorm_13_6')->isEmpty()) {

    And from this for 13_6


    if (!$element->getForm()->getElement('iphorm_13_6')->isEmpty()

    To this


    if (!$element->getForm()->getElement('iphorm_13_6')->isEmpty() && !$element->getForm()->getElement('iphorm_13_4')->isEmpty()

    All working now 🙂

    Kind regards
    Patrick

    in reply to: required fields #17937
    patdundee
    Participant

    Oops, spoke to soon
    This is the test site and url. There is a small issue that the required notice does not disappear and it retains the selected values in all fields

    test.trustedweddingsuppliers.co.uk/wedding-suppliers-services

    The custom validators and custom required field are in place for Service and Keyword (13_4) and (13_6) respective

    Here are the codes put n place

    On functions.php

    
    //Key Word Search
    		
    		function my_custom_required1($form)
    		{
    			$dropdown = $form->getElement('iphorm_13_4');
    			$text = $form->getElement('iphorm_13_6');
    		
    			if (!$dropdown->isEmpty()) {
    				$text->setRequired(false);
    			}
    		
    			if (!$text->isEmpty()) {
    				$dropdown->setRequired(false);
    			}
    		}
    		add_action('iphorm_pre_validate_13', 'my_custom_required1');
    		
    			//Validator for both fields above
    			
    			function my_custom_dropdown_validator1($valid, $value, $element)
    			{
    				if (!$element->getForm()->getElement('iphorm_13_4')->isEmpty()) {
    					$element->addError('Please choose from this menu or search by keword only below. You cannot use both.');
    					$valid = false;
    				}
    			
    				return $valid;
    			}
    			add_filter('iphorm_element_valid_iphorm_13_4', 'my_custom_dropdown_validator1', 10, 3);
    			
    			function my_custom_text_validator2($valid, $value, $element)
    			{
    				if (!$element->getForm()->getElement('iphorm_13_6')->isEmpty()) {
    					$element->addError('Please either enter a keyword or use the drop down menu above only. You cannot use both.');
    					$valid = false;
    				}
    			
    				return $valid;
    			}
    			add_filter('iphorm_element_valid_iphorm_13_6', 'my_custom_text_validator2', 10, 3);
    			
    			//End Validator
    		
    		//End Keyword Search
    

    and the java as given above is on the form in a html field

    Kind regards
    Patrick

    • This reply was modified 9 years, 6 months ago by patdundee.
    • This reply was modified 9 years, 6 months ago by patdundee.
    in reply to: required fields #17936
    patdundee
    Participant

    Perfect 🙂

    It is amazing how you can cutomise this form. I have got quite a bit of customisation in place for them. Have to always make sure I have a back up of everything before i do form updates. (Just in case lol).

    Many thanks
    Patrick

    in reply to: required fields #17929
    patdundee
    Participant

    Hi Ally

    That’s great (As always). Is there a way we can add to the to make them choose one or the other and not both?

    Kind regards
    Patrick

    in reply to: Multiple Upload file paths #17844
    patdundee
    Participant

    Just bought you a coffee on your coffee link 🙂

    in reply to: Multiple Upload file paths #17843
    patdundee
    Participant

    Bingo

    I can now start growing my hair again 🙂

    Many thanks Ally

    Kind regards
    Patrick

    in reply to: Multiple Upload file paths #17816
    patdundee
    Participant

    Hi Ally

    Sorry to bother you. This is really doing my head in lol

    I have tried every permutation i can thing of but i still end up with the same. The files always get dumped in the default iphorm year month folder

    Here is what I have I have changed the field number i am calling from 15_68 to 15_30 which is also an image upload

    
    function my_upload_path_1($path, $element)
    	{
    	$name = $element->getName();
        	if ($name == 'iphorm_15_30') {
    			$path = $_SERVER['DOCUMENT_ROOT'].'/3/';
    		}
            return $path;
    	add_filter('iphorm_upload_path_15', 'my_upload_path_1', 10, 2);
    	}
    

    Any ideas would be a great help 🙂

    Many thanks
    Patrick

    in reply to: Bug found #17815
    patdundee
    Participant

    Will do

    Many thanks

    in reply to: Drop down menu multiple select required #17814
    patdundee
    Participant

    Midas touch 🙂

    That works just fine thanks

    Patrick

    in reply to: Multiple Upload file paths #17813
    patdundee
    Participant

    Hi Ally

    I have tried the following code and also created a folder on the server call “3” I have given it full 0777 permissions and also set both User and Group to both ftpuser / ftpgroup and also tried www-data for both user and group but the file does not appear in the folder

    
    	function my_upload_path_1($path, $element)
    	{
    		$name = $element->getName();
    	
    		if ($name == 'iphorm_15_68') {
    			$path = '../../../3/';
    		}
    	
    		return $path;
    	}
    	add_filter('iphorm_upload_path_15', 'my_upload_path_1', 10, 2);
    

    Have also tried setting the path as

    
    $_SERVER['DOCUMENT_ROOT'].'/3/';
    

    Still no file
    🙂
    Any ideas?

    PS I am of course using child theme functions page as i do for all other form changes
    Many thanks

    • This reply was modified 9 years, 7 months ago by Ally.
    in reply to: Multiple Upload file paths #17809
    patdundee
    Participant

    That makes more sense now 🙂

    in reply to: Drop down menu multiple select required #17808
    patdundee
    Participant

    🙂

    in reply to: Drop down menu multiple select required #17807
    patdundee
    Participant

    Hi Ally

    The size is not functioning correctly on that one. Instead of showing the first 8 items it is only showing 1 but you can use cursor or mouse to scroll down and do multiples.

    You can view here

    http://test.trustedweddingsuppliers.co.uk/advertise-with-trusted-wedding-suppliers/

    Scroll down and select Bronze from the Listing Type and the form will open

    Move down to the 5th row and the second item in displayed as Business Area to see live preview

    Kind regards
    Patrick

    in reply to: Bug found #17805
    patdundee
    Participant

    Gosh
    I have quite a bit of custom code for the forms 🙂

    I do use WP_Session Manager to create wp_sessions for separate item names though

Viewing 15 posts - 76 through 90 (of 126 total)
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy