asHtmlID prepends as-values-

Henrik's Avatar

Henrik

12 Sep, 2012 10:30 AM

Hi,

when i submit my autosuggested form, the original id of the input field is't listed in the post variables. Instead my asHtmlID including as-values- is send. Like this i cannot work with the sent variables. How do i fix this?

Regards
Henrik

  1. 1 Posted by Jon on 13 Sep, 2012 06:28 AM

    Jon's Avatar

    That is correct, the variable is:

    as-values- + [asHtmlID]
    

    I don't understand why you can't work with that.

  2. 2 Posted by Henrik on 13 Sep, 2012 06:39 AM

    Henrik's Avatar

    Because I want the autosuggestes values added to the value of the original input field. So that the submitted variable is the id from the input.

  3. 3 Posted by Jon on 13 Sep, 2012 07:00 AM

    Jon's Avatar

    What I don't understand is why you can't change the variable id in your processing page/script.

    If that is not a possibility, try changing line 85 (on my script) from:

    var values_input = $('<input type="hidden" class="as-values" name="as_values_'+x+'" id="as-values-'+x+'" />');
    

    to

    var values_input = $('<input type="hidden" class="as-values" name="'+x+'" id="'+x+'" />');
    
  4. 4 Posted by Henrik on 13 Sep, 2012 10:57 AM

    Henrik's Avatar

    exactly this was my problem, i couldn't change the processing script, because i would have had to do changes in a core module of a cms. so you saved my life. thx.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac