I am struggling with an issue and can't figure out a solution.
I have a form that reload when I post a message.

The message goes through, everything works fine.
I am adding a color picker in the form and try to the get its value across....
it is not working.

I thought at first it was my "post" carrying over that was bug... but displaying it with alert, it seems correct.

So, before you all get mad, i did read other post in the forum such as this [article](https://stackoverflow.com/questions/23686180/how-to-get-value-of-type-color-input-using-javascript).
But I have a bug.

here is my html :

```
<form method="pos" class="d-flex" id="chatform">
    <div class=" mr-2" data-toggle="buttons" >
        <label class="btn button rounded-100 active">
            <input type="checkbox" unchecked autocomplete="off" id="bold"> B
        </label>
    </div>
    <div class=" mr-2" data-toggle="buttons">
        <label class="btn button rounded-100 active">
            <input type="checkbox" unchecked autocomplete="off" id="italic"><EM>It</EM>
        </label>
    </div>
    <div class="mr-2">
        <input type="color" class="color_btn mb-1" id="favcolor" value="#ffffff">
    </div>
    <div class="d-flex justify-content-between align-items-center mb-1">
        <div class="flex-grow-1">
            <textarea autofocus id="message" class="message_input" ></textarea>
        </div>
   </div>
</form>

```

So, now am using the following ajax to pass the info:

```
$('.message_input').keyup(function(e){if( e.which ==13){$('form').submit();}});
$('form').submit(function()
            {
                var message =   document.getElementById("message").value;
                var italic  =   document.getElementById("italic").value;
                var bold    =   document.getElementById("bold").value;
                var favcolor   =   document.getElementById("favcolor").value;

            $.post('core/chat_logic.php?action=send&message='+message+'&italic='+italic+'&bold='+bold+'&color='+favcolor, function(response){alert(response);} );});

```

Using php on the other side to send me back the post URL send in my response here is what i get :

> 
> "localhost/chat/v2/core/chat\_logic.php?action=send&message=fgdfg&italic=on&bold=on&color="
> 
> 
> 

as you can see the color value is always empty.

What I tried:

1. I tried setting a hard value="#ffffff" to the color picker, but the bug remain.
2. I changed the order of the parameter in my custom URL., and it always stop after color (ex: when i put the parameter right after color, here is what I get below. Not that italic and bold are still on.

> 
> "localhost/chat/v2/core/chat\_logic.php?action=send&message=testmessage&&color="
> 
> 
> 

3. I also tried something that thought would help me: i removed the methode="post" from the html form tag... This display my parameters in my url. And this is the only time where it displays my color value:

> 
> "&message=testmessage&&color=%23ffffff&&italic=on&bold=on
> 
> 
> 

So I was thinking maybe that the %23 that break the code... but then... I don't know why.
thank you in advance for your help

UPDATE

4. I added "alert(favcolor);" in my submit function, and it displays the correct color code, so my issue is with passing the argument over to php?

> 
> "%23ffffff "
> 
> 
>