Create Post

This page describes the request data identifiers and response structure required to build a page for creating posts.

Data Identifier

{
  "dataID": "ADD_POST"
}
KeyDescription
dataIDUnique data identifier

HTML

<form id="frm_save_post">
    <input type="hidden" name="board_seq" value="1">
    <input type="hidden" name="return_url" value="/post/list">
    <input type="text" id="subject" name="subject">
    <input type="text" id="email" name="email">
    <input type="text" id="cell_phone" name="cell_phone">
    <input type="text" id="reg_name" name="reg_name">
    <input type="password" id="password" name="password">
    <textarea id="content" rows="10" name="content"></textarea>
    <button type="submit" class="btn btn-primary px-4">Save</button>
</form>
  • form
    <form id="frm_save_post"></form>

    The post-save form; its id must be set to frm_save_post (required).

  • board_seq
    <input type="hidden" name="board_seq" value="1">

    The board sequence the post will be saved to. If needed, you can implement it as a select using board_list from the Response Result.

  • return_url
    <input type="hidden" name="return_url" value="/post/list">

    URL to navigate to after the post is saved.

  • subject
    <input type="text" id="subject" name="subject">

    Post title.

  • email
    <input type="text" id="email" name="email">

    Author email (not used when a member is the author).

  • cell_phone
    <input type="text" id="cell_phone" name="cell_phone">

    Author mobile number (not used when a member is the author).

  • reg_name
    <input type="text" id="reg_name" name="reg_name">

    Author name (not used when a member is the author).

  • password
    <input type="password" id="password" name="password">

    Post password (required for editing or deleting as a non-member).

  • content
    <textarea id="content" rows="10" name="content"></textarea>

    Post content.

Response Result

  • When the Save button is clicked, the post is saved and the user is redirected to return_url.
{
  "board_list": [
    {
      "access_level": 0,
      "board_code": "board_1001",
      "board_key": "E477FEEBEE4DB8BD208AFC505D20C022",
      "board_name": "free board",
      "create_date": "2025-05-30 02:53:34",
      "description": "description",
      "geo_info_flg": "N",
      "modify_date": "2025-05-30 02:53:34",
      "seq": "100"
    }
  ]
}
KeyDescription
board_listArray of boards
board_list[n].access_levelMember access level
board_list[n].board_codeBoard code (check in the admin console)
board_list[n].board_keyUnique board key
board_list[n].board_nameBoard name
board_list[n].create_dateBoard creation date and time
board_list[n].descriptionBoard description
board_list[n].modify_dateBoard modification date and time
board_list[n].seqBoard sequence

Example

<form id="frm_save_post">
    <input type="hidden" name="post_key"/>
    <input type="hidden" name="return_url"/>
    <div class="mb-3">
        <label for="subject" class="form-label">Post subject</label>
        <input type="text" class="form-control"	id="subject" name="subject" placeholder="Input Subject">
    </div>
    <div class="mb-3">
        <label for="email" class="form-label">Writer email</label>
        <input type="text" class="form-control"	id="email" name="email" placeholder="Input email">
    </div>
    <div class="mb-3">
        <label for="cell_phone"	class="form-label">Writer mobile number</label>
        <input type="text" class="form-control"	id="cell_phone"	name="cell_phone" placeholder="Input mobile number">
    </div>
    <div class="mb-3">
        <label for="reg_name" class="form-label">Writer name</label>
        <input type="text" class="form-control"	id="reg_name" name="reg_name" placeholder="Input name">
    </div>
    <div class="mb-3">
        <label for="reg_name" class="form-label">Password</label>
        <input type="password" class="form-control"	id="password" name="password" value="" placeholder="Input password">
    </div>
    <div class="mb-3">
        <label for="content" class="form-label">Post content</label>
        <textarea class="form-control" id="content_1" name="content[]" rows="10" placeholder="Input content"></textarea>
    </div>
    <div class="text-center">
        <button	type="submit" class="btn btn-primary px-4">Save</button>
    </div>
</form>