---
title: "Comment by Simon Ugorji on \"Form Fields PHP - v1.2\" | Hashnode"
description: "I noticed yesterday that the PHP function works so well if you&#39;re using it directly and not as an API using Ajax. If a form field is missing a value, it doe"
url: "https://hashnode.com/posts/form-fields-php-second-revision/6158604570a8165c11f63c91/comment/615ed536b945c81a907ce4f0"
---

[Discussion](https://hashnode.com/posts/form-fields-php-second-revision/6158604570a8165c11f63c91)

Comment [Form Fields PHP - v1.2](https://hashnode.com/posts/form-fields-php-second-revision/6158604570a8165c11f63c91)

[Simon Ugorji](https://hashnode.com/@simon-ugorji)

[Oct 7, 2021](https://hashnode.com/posts/form-fields-php-second-revision/6158604570a8165c11f63c91/comment/615ed536b945c81a907ce4f0)

I noticed yesterday that the PHP function works so well if you're using it directly and not as an API using Ajax.

If a form field is missing a value, it doesn't output the fields missing a value when building as an API with Ajax

You will see some error about an unexpected token

Well this is because it was built only to be used directly from your PHP script, not as an API.

I have taken notice of this bug and will issue a fix soon.

[Simon Ugorji](https://hashnode.com/@simon-ugorji)

[Oct 7, 2021](https://hashnode.com/posts/form-fields-php-second-revision/6158604570a8165c11f63c91/comment/615ed536b945c81a907ce4f0#reply-615ed5c48e8734462af5c73a)

If you want to know the exact location of the bug, check the block

CUSTOM USER ALERT
