backdrop-contrib / webform Goto Github PK
View Code? Open in Web Editor NEWFor making surveys and forms in Backdrop.
License: GNU General Public License v2.0
For making surveys and forms in Backdrop.
License: GNU General Public License v2.0
If the variables don't exist in Drupal 7 they'll just get null overwritten the default in the CMI file. So they need defaults in addition to proper defaults being set in the CMI.
In the description text for "Token values" while setting up Webform components (./webform/components/new/..), if the site doesn't have the Token module installed, the description says to install it, but the link goes to the drupal.org Token project page:
"A full listing of tokens may be listed here by installing the Token module."
These links should all point to the Backdrop version.
Class was introduced in Drupal 7 Issue 1840776 and needs to be listed in hook_autoload_info()
in Backdrop.
The classes now have to be registered with hook_autoload_info() but in this module they were removed from .info but not placed in that hook.
I noticed this when trying to export submissions and it couldn't find the class webform_exporter.
https://www.drupal.org/node/1235918. This was inherited by Backdrop, but still there in Webform.
Pushing change now.
There are two of them, one of which is a security-related one:
https://www.drupal.org/project/webform/releases/7.x-3.25
Issue #2600316 by torotil: Partially backport webform_get_submissions() refactoring [view commit]
Issue #2035329 by jweowu: Explicitly deny access to uploaded private files, if not permitting access. [view commit]
The security commit changes seem to be in our latest 1.x-1.x (can't see a commit or PR for it though ??), so PR for the other issue upcoming...
Submission email has no page breaks, the submissions are all listed inline.
I'm upgrading from Drupal 7 (webform version 7.x-4.14) and I get the following fatal error when upgrading to Backdrop (webform version 1.x-1.2.2)
Failed: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.action' in 'field list': INSERT INTO {webform_conditional_actions} (nid, rgid, action, target_type, target, argument) SELECT c.nid AS nid, c.rgid AS rgid, c.action AS action, c.target_type AS target_type, c.target AS target, '' AS argument FROM {webform_conditional} c ORDER BY nid ASC, rgid ASC; Array ( ) in webform_update_1008() (line 1081 of backdrop/modules/contrib/webform/webform.install).
Looking at my Drupal 7 schema, the action
column is already on the webform_conditional_actions
and not on the webform_conditional
table.
It looks like webform_update_1008
is similar to webform_update_7423
in Drupal 7. If we are to have both, there will need to be some better checking to assure webform_update_1008()
is not run if webform_update_7423
has already been run in Drupal 7.
Upgrading from Drupal with webform and there's no check to see if the default views exist and install them if they don't.
There was no update function to change the rid to be a varchar to match the database schema. It results in this issue:
Incorrect integer value: 'authenticated' for column 'rid' at row 1: INSERT INTO {webform_roles} (nid, rid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 648 [:db_insert_placeholder_1] => authenticated ) in webform_node_update() (line 1506 of /home/nubeli/a.nubeli.org/backdrop/modules/contrib/webform/webform.module).
Need to get the logic right by storing the boolean rather than strings.
I get this error when exporting submissions:
Warning: Division by zero in webform_results_batch_rows() (line 1242 of /home/nubeli/a.nubeli.org/backdrop/modules/contrib/webform/includes/webform.report.inc).
Looks like @quicksketch has his hands full and @biolithic doesn't want to be a maintainer. I'd be willing to be one of the maintainers if that's okay with the current maintainers.
I'll mostly focus on making sure that releases from Drupal 7 get merged in and make small fixes here and there.
Nice job on getting webform migrated!
I haven't tried it yet, but noticed that there should be a 1xxx update function from Drupal to Backdrop. And can drop the 7xxx updates.
I look forward to giving it a spin.
The tests will need to be in a separate tests directory with a .info file in order to run them.
An error occurs when exporting form results to a spreadsheet. (webform-1.x-1.x)(backdrop-1.1.2)
(PHP Version 5.3.10-1ubuntu3.19)
Any thoughts would be appreciated.
Error:
(An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /t5/batch?id=3&op=do_nojs&op=do StatusText: Internal Server Error ResponseText:)
(Warning: Missing argument 2 for backdrop_tempnam(), called in /var/www/merpmerp.com/t5/modules/webform-1.x-1.x/includes/webform.report.inc on line 765 and defined in backdrop_tempnam() (line 2442 of /var/www/merpmerp.com/t5/core/includes/file.inc).
Notice: Undefined variable: prefix in backdrop_tempnam() (line 2448 of /var/www/merpmerp.com/t5/core/includes/file.inc).)
I am trying to use the query options feature whereby the user selects a topic and webform emails the form result to a specific email address, using this admin form to set the addresses:
But the email addresses I enter do not seem to be being saved either in the webform.settings config file nor in a data table e.g. webform_emails.
I am now trying to work out what should be happening here.
I always create a webform and dumbly go looking for it as a block...then I remember where the checkbox is to make it available as a block.
I only know where that is, because I've made many a webform in the past, but I've never thought it was worthy of "advanced settings" territory and common enough need to place elsewhere.
The Views module makes it clear whether you're making a block, a page, or both right up front. I propose to place that checkbox on the create a webform page underneath the body field.
Only a quick notion I haven't thought through too much. Thoughts?
Not everyone is going to do a fresh install of this module and for those they'll see some glaring issues with missing defaults or variables set as strings instead of arrays in the config file. Here are the ones I found (there may be more):
webform_allowed_tags
should be an array: ["a", "em", "strong", "code", "img"]
webform_node_types_primary
should be an array ["webform"]
webform_progressbar_style
should be ["progressbar_bar", "progressbar_pagebreak_labels", "progressbar_include_confirmation"]
webform_node_types
should be ["webform"]
I was unable to export webform.settings. I think we need webform_config_info() rather than mailsystem_config_info() in webform.module.
user_timezone_configurable
should be user_configurable_timezones
It doesn't need to be backwards compatible with previous versions of Backdrop since this was broken in Backdrop core before 1.6.1.
The git repo was forked from just before 7.x-4.5 (until commit 7b61e60), but the code base seems to be from 7.x-4.4. So it seems to have inadvertently reverted the changes to a few commits applied after 7.x-4.4.
As far as I can tell it's 7.x-4.4 based on the subsequent commit log for issue 2447745. There have been a lot of commits since then--they've been busy fixing bugs!--so it would also be good to track the Drupal changes and merge them in
Now that there's a project page for the module on https://backdropcms.org/project/webform let's update the URLs to go there instead of other places.
..also, the link to the Drupal forms_api.html is dead, so I'll update that to go to the Backdrop CMS docs as well.
The submit function on the settings form is saving junk like the form_id, op into the json file. Better to be specific about which variables to save.
This was done in Drupal 7 but wasn't updated in this fork to work for Backdrop storing content type config in per content type config. So instead of trying this in webform.install, which does nothing:
config_set('webform.settings', 'comment_webform', '0');
it should be:
if (config_get('webform.settings', 'webform_install_create_content_type')) {
$webform_type = array(
'type' => 'webform',
'name' => st('Webform'),
'base' => 'node_content',
'description' => st('Create a new form or questionnaire accessible to users. Submission results and statistics are recorded and accessible to privileged users.'),
'custom' => TRUE,
'modified' => TRUE,
'locked' => FALSE,
'settings' => array(
'comment_enabled' => FALSE,
),
);
$webform_type = node_type_set_defaults($webform_type);
node_type_save($webform_type);
I have just installed Webform but it is saying that a user must log-in in order to see and use the form. I have tried setting permissions so that ananonymous user can create new webform content but that hasn't made any difference. Any suggestions?
When updating from Drupal to backdrop all you see in the UI for the webform update is
webform module
1000 -
which can be a little scary. By adding a docblock to the update function users will know what is about to happen to their webforms!' How about something like this?
/**
* Update webforms from Drupal to Backdrop.
*/
Incorrectly in webform_admin_settings_submit() in includes/webform.admin.inc, the config is being saved at the beginning instead of at the end so it misses some changes that also need to be saved such as the disabled components.
When I just set the webform to reload the page upon submission, I was expecting to see a "you submitted a webform, great job!" message, but I saw nothing. Maybe this is because the theme I'm using or the fact that the webform is in a block, but I think it'd be a good idea to allow users to input a message to the user, with a default fallback, in order to ensure the user knows they have submitted the form correctly.
For variables that should be called from system.core:
and from system.date:
It looks like webform_update_last_removed()
contains a drupal 6 upgrade number, but if this module was ported to Backdrop from Drupal 7 this should be the number of the last Drupal 7 update hook, and should be 7000+.
The most recent update hook in webform 4.x is numbered 7430, so I'd guess that's what should be in hook_update_last_removed() but I read #26 and now I'm not sure that's corect as the last hook in 4.4 is numbered 7421.
This is easily fixed by updating the form so that the submit button array is within an 'action' array as per the Backdrop update docs.
in webform.module should be:
case 'webform_progressbar_label_first':
$result = t(config_get('webform.settings', 'webform_progressbar_label_first'));
break;
case 'webform_progressbar_label_confirmation':
$result = t(config_get('webform.settings', 'webform_progressbar_label_confirmation'));
break;
Hi! I am sorry if this is something of my fault but may be somebody could direct me to a right way :)
I try to show my Webform content in a block.
According to the instructions - "You may customize different view modes (other than the "Form only" mode)" - I have customized it to Full content but it does not work for me. After the block configuration is saved and the layout is saved too it switches back to the Form only mode.
I have tried to set up Full content mode for Webform block in Drupal 7 and there is no any problem - it works well.
Should be:
'roles' => array('anonymous', 'authenticated'),
Not:
'roles' => array('1', '2'),
Migration from Drupal 7.41 to Backdrop 1.3.2, webform was not uninstalled in order to keep the data.
Webforms do not show and following errors:
Warning: array_flip() expects parameter 1 to be array, null given in webform_components() (Zeile 4323 von /home/www/backdrop/modules/webform/webform.module).
and then many times (seems to be one for every webform):
Warning: array_key_exists() expects parameter 2 to be array, null given in webform_components() (Zeile 4328 von /home/www/backdrop/modules/webform/webform.module).
and last:
Warning: Invalid argument supplied for foreach() in form_type_checkboxes_value() (Zeile 2400 von /home/www/backdrop/core/includes/form.inc).
Should be:
include_once BACKDROP_ROOT . '/core/includes/locale.inc';
I would like to have a field that is entered by means of radio buttons. There seems to be an issue here which I will investigate.
On a site I'm working on I notice that when editing a webform the Admin theme is respected, but on the "Webform" and "Results" tab it uses the front end theme. It seems that these should use the Admin theme as well, right?
In the message received from the form I have this header:
From: [email protected] โ it is wrong!
To: [email protected]
Reply: [email protected]
I the From field is displayed the admin's e-mail but I would like it be something like [email protected] or a sender's e-mail (the same like in Reply field).
Can not understand how to do it ๐
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.