Accepted answer

You could use repeated (String, String) tuples as the last parameter:

@(fieldId: String, fieldTitle: String, data: (String, String) *)

<div class="form-group">
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
    <label for="@fieldId" class="control-label">@fieldTitle</label>
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
    <span class="input-icon input-icon-right" style="width:100%">
        <input type="text" class="autocomplete-relation" 
        data-id-status="@fieldTitle"{ case (key, value) => 
        <i id="response_@fieldTitle" class="icon-search blue"></i>

And you'd call it the way you're wanting:

@autocomplete("someId", "someTitle", "data-url" -> "", "data-attr" -> "someValue")

You could also use a Map[String, String].

@(fieldId: String, fieldTitle: String, data: Map[String, String])

The rest of the template would remain the same, but you'd pass it something like this:

Map[String, String](
    "data-url" -> "",
    "data-field-something" -> "value"

Related Query

More Query from same tag