The webform module manages his state (opening and closing) with a radiobox. Would it be possible to permit/add the configuration of this state:
- with 2 date-time (for opening and closing date),
- or/and with the use of a token refering to 2 fields from the content type which refer to the webform.
| Comment | File | Size | Author |
|---|---|---|---|
| #30 | add_webform_status-2845724-30.patch | 5.72 KB | jrockowitz |
| #27 | add_webform_status-2845724-27.patch | 1.52 KB | jrockowitz |
| #23 | Screen Shot 2017-03-02 at 2.47.10 PM.png | 156.07 KB | jrockowitz |
| #20 | add_webform_status-2845724-20.patch | 82.08 KB | jrockowitz |
| #18 | add_webform_status-2845724-18.patch | 81.98 KB | jrockowitz |
Comments
Comment #2
CatherineOmega commentedI think this might be a duplicate of https://www.drupal.org/node/2779461?
Comment #3
benfarhat commentedThank you for your answer Catherine, I don't think it's the same, if I understood correctly, jreydet ask for an automatic update of a users form submission as soon as this user change one of its settings (email address or others).
My request only concerns the way we activate (open) or desactivate (close) a webform (status form is set by a radiobox "open" or "close").
I have a content type "job application" where i have two fields (date) "open-registry" and "close-registry" and a referer to a "job application form".
I don't know if i'm clear but i ask for the possibility to open or close my "job application form" (for a node) manually with 2 dates (and not only with a radiobox that open or close) and eventually by using a sort of tokens that use these fields "open-registry" and "close-registry" to set the "job application form" status.

_________________________________________________________________________________
Comment #4
jrockowitz commentedI think you can use the Scheduler module and/or the Rules module to implement this feature.
I do see a benefit to having this feature included in the core Webform module and it should be added to the Webform module's backlog/wishlist.
Comment #5
benfarhat commentedThank you for your answer Jacob,
Unfortunately Scheduler only work with nodes (webform scheduler permit it but it only works with webform 7.x) and I don't find a way to make this feature works with Rules...
Comment #6
jrockowitz commentedI am think adding a close/open date makes sense. I am not sure about token support because it could be very buggy but I do feel that an open/close date will need to be added to the Webform entity and the Webform field type.
Below is the Webform entity...
Here is the Webform field type..
For now, I am solely focusing on getting open/close date support added the Webform entity. Once this is done, I will create a new ticket for adding open/close date support to the Webform field type.
Comment #9
jrockowitz commentedComment #13
jrockowitz commentedComment #16
jrockowitz commentedComment #18
jrockowitz commentedComment #20
jrockowitz commentedHere is hopefully the final patch.
Comment #22
jrockowitz commented@see #2857417: Add support for open and close date/time to Webform nodes.
Comment #23
jrockowitz commentedBelow is a screenshot of the 'Scheduled' settings.
Comment #24
goldlilys commentedAfter updating webform to version 8.x-5.0-beta8 , when running drush updb
I'm getting the following error:
webform module :
8020 - Issue #2845724: Add webform opening and closing datetime.
Do you wish to run all pending updates? (y/n): y
Invalid "1" status argument. [error]
Performing webform_update_8020 [ok]
Failed: Invalid "1" status argument. [error]
Cache rebuild complete. [ok]
Finished performing updates.
And it never is able to update that part because when I run drush updb again, that entire thing shows up again. Not sure if anyone else has had this trouble?
Comment #25
jrockowitz commentedPlease see #2857981: Update #8020 Failed Upgrading from beta7 to beta8
Comment #26
Anonymous (not verified) commentedHello Jacob,
there is a little problem with the new Scheduler feature. It depends on the Templates "submodule" to work. So when the Templates module is not active, the states can't be true and the scheduler date fields will never show up.
WebformEntitySettingsForm.php (line 217)
The template input is only in the form with an active Templates module. Maybe it's better to conditionally hide (disable) the entire scheduling radio when a form becomes a template and leave a note about the reason for disabling it.
Best regards
Mike
Comment #27
jrockowitz commentedThe attached patch should address this issue.
Comment #29
jrockowitz commentedI committed the patch. Please download and review the latest dev release.
Comment #30
jrockowitz commentedComment #31
jrockowitz commentedComment #33
jrockowitz commentedComment #34
stella commentedAwesome! Thanks jrockowitz!