Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Nick Sotiriadis

Forum Replies Created

Viewing 10 posts - 11 through 20 (of 23 total)
  • Nick Sotiriadis in reply to:
    Number Ranges Min-Max values
    #258147

    Yes, it does! So, initially, before triggering the search form, you set it to the max value and then using if (!isset($_GET['option'])) you just ignore it.

    Nick Sotiriadis in reply to:
    Number Ranges Min-Max values
    #258142

    Sorry for bashing on the post…

    just a slight improvement of the code would be in this particular case. If no selection is made, then use these values.

    if (!isset($_GET['_sfm_car_engine_size'])) {
      $input_object['default_max']=500000;
      $input_object['default_max_formatted']=500000;
    }
    Nick Sotiriadis in reply to:
    Number Ranges Min-Max values
    #258136

    Actually you can – sorry to prove you wrong!- just found it by examining the $input_object;

    I defined in the function:

    $input_object['default_max']=4000;
    $input_object['default_max_formatted']=4000;
    Nick Sotiriadis in reply to:
    Number Ranges Min-Max values
    #258123

    …New question… I have no idea how to initially pre-select the last biggest value for tha max input option?

    Nick Sotiriadis in reply to:
    Number Ranges Min-Max values
    #258119

    So, here is my code, don’t know how you want to make use for it, but here it is in case it helps someone!

    First of all, I just set a couple of values in the admin, 0-100 – it makes no difference since I am unsetting the initial options anyway:

    function change_car_engine_size($input_object, $sfid) {
    		if($input_object['name']=='_sfm_car_engine_size') {
    			unset($input_object['options']);
    			$input_object['options']=array();
    			$arr = ['0','100','200','300','400', '500', '600', '700', '800', '900', '1000','2500','3000','3500','4000'];
    			foreach ($arr as $value) {
    				$new_option = new StdClass();
    				$new_option->value = $value;
    				$new_option->label = number_format($value, 0, ',', '.');
    				array_push($input_object['options'], $new_option);
    			}
    
    		}
    	return $input_object;
    }
    add_filter('sf_input_object_pre', 'change_car_engine_size', 10, 2);
    Nick Sotiriadis in reply to:
    Responsive form behaviour
    #258096

    …when I was talking about a cloned form, I don’t mean replicating a form with the same ID in the same page, but rather cloning from the admin and using two different SFID forms.

    It would be cool to have a workaround in V3!

    Nick Sotiriadis in reply to:
    Number Ranges Min-Max values
    #258031

    Yes, I will try to have a look at it tomorrow and report back. Busy days…

    Nick Sotiriadis in reply to:
    Number Ranges Min-Max values
    #258012

    Awesome! And awesome support! Thanks Trevor!

    Nick Sotiriadis in reply to:
    Autocapitalize, autocorrect and autocomplete for search inputs
    #256432
    This reply has been marked as private.
    Nick Sotiriadis in reply to:
    Change search form slug?
    #256231

    Sorry, can’t edit original post, I am talking about the use of shortcodes!

Viewing 10 posts - 11 through 20 (of 23 total)