Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


English

In this article, we will discuss on how we can control form fields' values saving based on which button is clicked on form submission. Let's use this form as an example.

The business requirement is to not save the value for "Contact" when "Save As Draft" button is used to submit the form.


Thai

ในบทความนี้เราจะหารือเกี่ยวกับวิธีที่เราสามารถควบคุมการบันทึกค่าของเขตข้อมูลตามปุ่มที่คลิกบนการส่งแบบฟอร์ม ลองใช้แบบฟอร์มนี้เป็นตัวอย่าง

ข้อกำหนดทางธุรกิจคือการไม่บันทึกค่าสำหรับ "ติดต่อ" เมื่อใช้ปุ่ม "บันทึกเป็นแบบร่าง" เพื่อส่งแบบฟอร์ม

Image Modified

In order to address this requirement, the field "contact" needs to be in its own section. This is because form section offers permission control.

...

Thai

เพื่อตอบสนองความต้องการนี้ฟิลด์ "ผู้ติดต่อ" จะต้องอยู่ในส่วนของตนเอง นี่เป็นเพราะ form section มีการควบคุม permission control

ในส่วนที่เป็นฟอร์มย่อยให้ตั้งค่าการอนุญาตของส่วนเป็น Bean Shell Script


Image Modified

We will then need to detect when the "Save As Draft" button is clicked or not to determine the next step forward.

...