Okay
  Public Ticket #2269758
New location input in submission form
Closed

Comments

  •  2
    Matthieu started the conversation

    Hi,

    In the event submission form, is there a way to delete the drop-down list to enter a location (list of locations / button add a new location...) and leave only the form to enter a new location (address, city, country ...)?

    I would indeed like that at each new event, the address be filled in so just display the form. It must also be made required.

    Thanks!



  •  877
    Zhivko replied

    Try out this filter:

    add_filter('stec_builder_front_elements', function($elements) {
        
        $html   = array();
        $style  = 'margin-top:10px;';
        
        $html[] = '<input type="hidden" name="location" value="custom" />';
        $html[] = sprintf('<div class="stec-builder-submission-new-location-custom">');
        $html[] = sprintf('<input style="%s" class="stec-builder-element-content-input-style" type="text" name="location_address" placeholder="Address">', $style);
        $html[] = sprintf('<input style="%s" class="stec-builder-element-content-input-style" type="text" name="location_city" placeholder="City">', $style);
        $html[] = sprintf('<input style="%s" class="stec-builder-element-content-input-style" type="text" name="location_country" placeholder="Country">', $style);
        $html[] = sprintf('<input style="%s" class="stec-builder-element-content-input-style" type="text" name="location_coordinates" placeholder="Coordinates">', $style);
        $html[] = sprintf('<textarea class="stec-builder-element-content-textarea-style" name="location_details" placeholder="Details"></textarea>', $style);
        $html[] = '</div>';     $elements['location'] = array(
            implode('', $html)
        );     return $elements;
    });



    Stachethemes Developer

  • cnafc replied

    I'm also interested in giving the possibility to add offices.

    Where should I enter that code?

  •   Matthieu replied privately
  •  2
    Matthieu replied

    Hello canfc !

    Enter the code in the "function.php" file of your theme :)

    Matthieu

  •  2
    Matthieu replied

    To add a field "Office", I suppose that it happens in the file "class.builder-elements.php"...