Versions Compared

Key

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

This is an implementation of a registrations form with a waiting list

The form has capacity of 5 and the rest are registered into a waiting list

It also has an automation around the "deletion" of records from the "registered list" and promoting the 1st one from the waiting list into the "registered list"

Warning

It requires ConfiForms version 1.51.5 or later!!!

ConfiForms Form Definition
formNameregs
registrationFormTitleRegistrations
INLINE


whowho are youtext

statusstatusfalse[1=In list|2=waiting...|]select

statusHide field

_counttotal:<=5Create ConfiForms EntryonCreatedentryId=[entry.id]&status=1


_counttotal:>5Create ConfiForms EntryonCreatedentryId=[entry.id]&status=2


status:1Update ConfiForms entries by filtercreated ASC LIMIT 1onDeletedentryId=[entry.id]&status=1status:2


...

ConfiForms TableView
filterstatus:2
messageToShowWhenEmptyno one is in the waiting list
formNameregs

who

The storage format for the form could be found here

Code Block
<ac:structured-macro ac:macro-id="f373746e-15e6-411c-b5a5-19187c9efff5" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">regs1</ac:parameter>
  <ac:parameter ac:name="registrationFormTitle">Registrations</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="7785d191-0100-47af-8f1d-4a9743aeaec0" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <p>
      <ac:structured-macro ac:macro-id="8fa2d4c2-7f36-4ca9-939b-a7723de560e6" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">who</ac:parameter>
        <ac:parameter ac:name="fieldLabel">who are you</ac:parameter>
        <ac:parameter ac:name="type">text</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="43345309-9dd6-4d8f-be0e-05bf4db22712" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">status</ac:parameter>
        <ac:parameter ac:name="fieldLabel">status</ac:parameter>
        <ac:parameter ac:name="values">false[1=In list|2=waiting...|]</ac:parameter>
        <ac:parameter ac:name="type">select</ac:parameter>
      </ac:structured-macro>
    </p>
    <p>
      <ac:structured-macro ac:macro-id="94ee235c-3e3f-477e-be01-d32d207d2dbe" ac:name="confiform-field-definition-rules" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">status</ac:parameter>
        <ac:parameter ac:name="action">Hide field</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="1c0e5c1e-e3c5-423d-bc37-f57806a954b4" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">_count:&lt;=5</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;status=1</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="47f2d2c2-c256-46cf-bfd0-fa1ec670c96b" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">_count:&gt;5</ac:parameter>
      <ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
      <ac:parameter ac:name="event">onCreated</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;status=2</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="d038abeb-0a0a-4473-9ef8-07c697de41d9" ac:name="confiform-ifttt" ac:schema-version="1">
      <ac:parameter ac:name="condition">status:1</ac:parameter>
      <ac:parameter ac:name="action">Update ConfiForms entries by filter</ac:parameter>
      <ac:parameter ac:name="extras">created ASC LIMIT 1</ac:parameter>
      <ac:parameter ac:name="event">onDeleted</ac:parameter>
      <ac:parameter ac:name="title">entryId=[entry.id]&amp;status=1</ac:parameter>
      <ac:parameter ac:name="extras2">status:2</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<p>Registrations</p>
<ac:structured-macro ac:macro-id="91445e8d-68b5-4e0d-9ee9-b7ec8596bf97" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="filter">status:1</ac:parameter>
  <ac:parameter ac:name="messageToShowWhenEmpty">no one has registered yet</ac:parameter>
  <ac:parameter ac:name="formName">regs1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="55c8e05c-ec61-49e7-9e28-8a9b08baf8fd" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">who</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
<p>Waiting list</p>
<ac:structured-macro ac:macro-id="a80e0d63-031b-4e22-aa07-67969805765e" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="filter">status:2</ac:parameter>
  <ac:parameter ac:name="messageToShowWhenEmpty">no one is in the waiting list</ac:parameter>
  <ac:parameter ac:name="formName">regs1</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="c3a1a0a2-dcee-4f89-9846-931925a77865" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">who</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>