• Resolved cortesia

    (@cortesia)


    Hello, I currently have the title field of type text, how can I change it to type select and place variables and save the data in backend?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Do something like this:

    /**
     * Modifies the submission form fields
     * Paste this in your active theme's functions.php file.
     * @return array
     */
    add_filter('site-reviews/config/forms/submission-form', function ($config) {
        $config['title']['type'] = 'select';
        $config['title']['options'] = [
            '' => __('Select a title'),
            __('Title 1') => __('Title 1'), // value => label
            __('Title 2') => __('Title 2'),
            __('Title 3') => __('Title 3'),
        ];
        return $config;
    });
    Thread Starter cortesia

    (@cortesia)

    hey!!! thank, its work perfect!!!!
    you are the best!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘modify the type of field for the title to select option’ is closed to new replies.