Jump to content

Getting Tags to automatically display suggestions on Click


AlexWright

Recommended Posts

Posted

Hi all,

Is it possible in an open tagging system to get all suggested tags to drop-down when the Tags field is clicked, rather than when a member begins typing? I realize it has to do with this part:

	{{if ( !isset( $autoComplete['commaTrigger'] ) || $autoComplete['commaTrigger'] !== FALSE )}}
    {{// If the stored value has commas in it, we need to explode then implode to get the newlines}}
    {{if mb_stripos( $valueToDisplay, ',') !== FALSE}}
        {{$valueToDisplay = implode("\n", explode(",", $valueToDisplay));}}
    {{endif}}    
{{endif}}
	<div>
{{if ( isset( $autoComplete['freeChoice'] ) && !$autoComplete['freeChoice'] ) || ( isset( $autoComplete['prefix'] ) and $autoComplete['prefix'] ) }}
<div {{if isset( $autoComplete['freeChoice'] ) && !$autoComplete['freeChoice']}}class="ipsJS_show"{{endif}} {{if isset( $autoComplete['prefix'] ) and $autoComplete['prefix']}}data-controller='core.global.core.prefixedAutocomplete'{{endif}}>
{{endif}}
<textarea
    name="{$name}"
    id='elInput_{expression="preg_replace('/[^a-zA-Z0-9\-_]/', '_', $name)"}'
    class="{$class}"
    {{if $maxlength !== NULL}}maxlength="{$maxlength}"{{endif}}
    {{if $required === TRUE}}aria-required='true'{{endif}}
    {{if $disabled}}disabled aria-disabled='true'{{endif}}
    {{if $placeholder}}placeholder="{$placeholder}"{{endif}}
    data-ipsAutocomplete
    {{if isset( $autoComplete['freeChoice'] ) && !$autoComplete['freeChoice']}}data-ipsAutocomplete-freeChoice='false'{{endif}}
    {{if isset( $autoComplete['forceLower'] ) && $autoComplete['forceLower']}}data-ipsAutocomplete-forceLower{{endif}}
    {{if isset( $autoComplete['maxItems'] )}}data-ipsAutocomplete-maxItems='{$autoComplete['maxItems']}'{{endif}}
    {{if !empty($autoComplete['unique'])}}
        data-ipsAutocomplete-unique
    {{endif}}
    {{if isset($autoComplete['source']) AND is_array( $autoComplete['source'] )}}
        list='{$name}_datalist'
    {{elseif !empty($autoComplete['source'])}}
        data-ipsAutocomplete-dataSource="{url="{$autoComplete['source']}"}"
        data-ipsAutocomplete-queryParam='input'
    {{endif}}
    {{if !empty($autoComplete['resultItemTemplate'])}}
        data-ipsAutocomplete-resultItemTemplate="{$autoComplete['resultItemTemplate']}"
    {{endif}}
    {{if isset( $autoComplete['minLength'] )}}data-ipsAutocomplete-minLength='{$autoComplete['minLength']}'{{endif}}
    {{if isset( $autoComplete['maxLength'] )}}data-ipsAutocomplete-maxLength='{$autoComplete['maxLength']}'{{endif}}
    {{if isset( $autoComplete['minAjaxLength'] )}}data-ipsAutocomplete-minAjaxLength='{$autoComplete['minAjaxLength']}'{{endif}}
    {{if isset( $autoComplete['disallowedCharacters'] )}}data-ipsAutocomplete-disallowedCharacters='{expression="json_encode( $autoComplete['disallowedCharacters'] )"}'{{endif}}
    {{if isset( $autoComplete['commaTrigger'] ) && $autoComplete['commaTrigger'] === FALSE}}data-ipsAutocomplete-commaTrigger='false'{{endif}}
>{$valueToDisplay}</textarea>

I'm just uncertain what to actually do with this to edit the functionality.

Cheers!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...