# I make time-form and need 6 of them need help why i can use only one

**URL:** <https://discourse.nodered.org/t/i-make-time-form-and-need-6-of-them-need-help-why-i-can-use-only-one/76641>\
**Category:** General\
**Created:** [16 March 2023 20:28 UTC](https://discourse.nodered.org/t/i-make-time-form-and-need-6-of-them-need-help-why-i-can-use-only-one/76641 "2023-03-16T20:28:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phonix191](https://avatars.discourse-cdn.com/v4/letter/p/58f4c7/32.png) [@Phonix191](https://discourse.nodered.org/u/Phonix191)\
**Post date:** [16 March 2023 20:28 UTC](https://discourse.nodered.org/t/i-make-time-form-and-need-6-of-them-need-help-why-i-can-use-only-one/76641/1 "2023-03-16T20:28:08Z")

</div>

```auto
[
    {
        "id": "6413a75bc26624d5",
        "type": "tab",
        "label": "Flow 3",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "6f4019ff5839f3ce",
        "type": "http response",
        "z": "6413a75bc26624d5",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 670,
        "y": 160,
        "wires": []
    },
    {
        "id": "5a450b35838cf1c0",
        "type": "http in",
        "z": "6413a75bc26624d5",
        "name": "",
        "url": "/time-form",
        "method": "post",
        "upload": false,
        "swaggerDoc": "",
        "x": 380,
        "y": 220,
        "wires": [
            [
                "6f4019ff5839f3ce",
                "8e6f24219e6d5628"
            ]
        ]
    },
    {
        "id": "7c8013576233982a",
        "type": "ui_template",
        "z": "6413a75bc26624d5",
        "group": "2005ea10b222ccc9",
        "name": "Mon-to-Fri_On-Timer",
        "order": 3,
        "width": 0,
        "height": 0,
        "format": "<html>\n\n<head>\n <title>Time Form</title>\n <script src=\"https://code.jquery.com/jquery-3.6.0.min.js\"></script>\n <script>\n $(function() {\n $('form').submit(function(event) {\n event.preventDefault();\n $.ajax({\n url: '/time-form',\n type: 'POST',\n data: $('form').serialize(),\n success: function(result) {\n $('#result').text(result);\n }\n });\n });\n });\n </script>\n\n</head>\n\n<body>\n <h1>Enter a Time Value</h1>\n <form>\n <label for=\"time-input\">Time:</label>\n <input type=\"time\" id=\"time\" name=\"time\" value=\"{{payload.time}}\">\n <button type=\"submit\">Submit</button>\n </form>\n <div id=\"result\"></div>\n</body>\n\n\n\n</html>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 460,
        "y": 160,
        "wires": [
            [
                "6f4019ff5839f3ce"
            ]
        ]
    },
    {
        "id": "ea45db27910ba680",
        "type": "function",
        "z": "6413a75bc26624d5",
        "name": "function 51",
        "func": "// Convert hexadecimal string to decimal number\nvar in_value = msg.payload;\n//var ura = in_value * 100\nvar ura = in_value * 1\nvar hex = msg.payload\nvar decimal = parseInt(ura, 16);\n\n// Create new message with decimal number\nmsg.payload = decimal;\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 220,
        "wires": [
            [
                "74b534acf8298ce0"
            ]
        ]
    },
    {
        "id": "8e6f24219e6d5628",
        "type": "function",
        "z": "6413a75bc26624d5",
        "name": "function 52",
        "func": "var timeValue = msg.payload.time;\n\n// Check that the time value is not empty\nif (!timeValue) {\n msg.payload = \"Error: Time value is empty\";\n return msg;\n}\n\nvar timeParts = timeValue.split(\":\");\nvar hours = parseInt(timeParts[0]);\nvar minutes = parseInt(timeParts[1]);\n\n//var decimalValue = hours + minutes / 60;\nvar decimalValue = hours *100 + minutes ;\nmsg.payload = decimalValue;\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 570,
        "y": 220,
        "wires": [
            [
                "ea45db27910ba680"
            ]
        ]
    },
    {
        "id": "1ced31a1d5dcee6a",
        "type": "comment",
        "z": "6413a75bc26624d5",
        "name": "nedelujoč form za time",
        "info": "",
        "x": 580,
        "y": 120,
        "wires": []
    },
    {
        "id": "6b0f3fa0b1cd2f44",
        "type": "http in",
        "z": "6413a75bc26624d5",
        "name": "",
        "url": "/time-form",
        "method": "get",
        "upload": false,
        "swaggerDoc": "",
        "x": 240,
        "y": 160,
        "wires": [
            [
                "7c8013576233982a"
            ]
        ]
    },
    {
        "id": "74b534acf8298ce0",
        "type": "debug",
        "z": "6413a75bc26624d5",
        "name": "debug 21",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 220,
        "wires": []
    },
    {
        "id": "2005ea10b222ccc9",
        "type": "ui_group",
        "name": "test",
        "tab": "e2e04d88d4584015",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "e2e04d88d4584015",
        "type": "ui_tab",
        "name": "test timer",
        "icon": "dashboard",
        "order": 9,
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [20 March 2023 12:34 UTC](https://discourse.nodered.org/t/i-make-time-form-and-need-6-of-them-need-help-why-i-can-use-only-one/76641/2 "2023-03-20T12:34:14Z")

</div>

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

* * *

You will also want to share some more details about what you are trying to achieve and what you've tried so far.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [20 March 2023 14:39 UTC](https://discourse.nodered.org/t/i-make-time-form-and-need-6-of-them-need-help-why-i-can-use-only-one/76641/3 "2023-03-20T14:39:06Z")

</div>

Take a look at the cookbook entry [Create an HTTP Endpoint](https://cookbook.nodered.org/http/create-an-http-endpoint) and see where you can go from there.

Also please explain what you are trying to do.

I fixed your code but in order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 May 2023 14:39 UTC](https://discourse.nodered.org/t/i-make-time-form-and-need-6-of-them-need-help-why-i-can-use-only-one/76641/4 "2023-05-19T14:39:41Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
