b2bcodext / cms-form-builder Goto Github PK
View Code? Open in Web Editor NEWCMS Form Builder is a flexible OroCommerce extension that allows you to easily create forms via UI
License: Other
CMS Form Builder is a flexible OroCommerce extension that allows you to easily create forms via UI
License: Other
When main application has CI with test for missing translations, main app build fails:
Found 11 missing translations:
b2bcode.cmsform.entity_grid_all_view_label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsForm]
b2bcode.cmsform.fields.label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsForm; Field: fields]
b2bcode.cmsform.cmsformfield.entity_grid_all_view_label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFormField]
b2bcode.cmsform.cmsformfield.options.label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFormField; Field: options]
b2bcode.cmsform.cmsfieldresponse.entity_grid_all_view_label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFieldResponse]
b2bcode.cmsform.cmsformnotification.entity_grid_all_view_label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFormNotification]
b2bcode.cmsform.cmsformnotification.id.label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFormNotification; Field: id]
b2bcode.cmsform.cmsformnotification.email.label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFormNotification; Field: email]
b2bcode.cmsform.cmsformnotification.form.label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFormNotification; Field: form]
b2bcode.cmsform.cmsformnotification.template.label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFormNotification; Field: template]
b2bcode.cmsform.cmsformresponse.entity_grid_all_view_label [Entity: B2bCode\Bundle\CmsFormBundle\Entity\CmsFormResponse]
Suggested translations:
b2bcode:
cmsform:
entity_grid_all_view_label: 'All forms'
fields:
label: 'Fields'
cmsformfield:
entity_grid_all_view_label: 'All fields'
options:
label: 'Options'
cmsfieldresponse:
entity_grid_all_view_label: 'All responses'
cmsformnotification:
entity_grid_all_view_label: 'All notifications'
id:
label: 'Id'
email:
label: 'Email'
form:
label: 'Form'
template:
label: 'Template'
cmsformresponse:
entity_grid_all_view_label: 'All responses'
Error msg in red on the top. Contact us for help .
Hi,
As of Oro Platform 4.1.7, require('jquery-ui');
, which you use in https://github.com/b2bcodext/cms-form-builder/blob/release/2.0/src/B2bCode/Bundle/CmsFormBundle/Resources/public/js/app/components/sortable-fields-component.js#L11, is no longer available. Needs to be replaced with require('jquery-ui/widgets/sortable');
.
Not sure if that would be BC so I am not creating PR.
Hello,
There is an error when trying to add this package to ORO 5 this is the error message when running platform update
ERROR: An exception occurred while executing 'ALTER TABLE b2b_code_cms_form_response ALTER serialized_data TYPE JSONB': SQLSTATE[42804]: Datatype mismatch: 7 ERROR: column "serialized_data" cannot be cast automatically to type jsonb HINT: You might need to specify "USING serialized_data::jsonb".
Hi,
Do you have any plans adding support for form fieldsets? The idea is to be able to organize form for better UX. If not - would you have some suggestions on how to implement it?
Thanks,
JK
Hello,
We added new field type:
class CmsFormFileType extends AbstractType
{
public function getParent()
{
return SymfonyFileType::class;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefault(self::ALLOWED_FILE_TYPES_OPTION, []);
$resolver->setDefault(
'constraints',
function (Options $options) {
$allowedFileTypes = $options[self::ALLOWED_FILE_TYPES_OPTION];
if (empty($allowedFileTypes)) {
return null; // allow all files
}
return $this->convertAllowedFileTypesToConstraint($allowedFileTypes);
}
);
}
...
}
And the constraints do work, but when the field is made required too, they are no longer applied.
I was debugging a lot, could not find where is the problem, but from what I've seen, when the field is required, NotBlank constraint is added to the field, overriding other constrains (not exactly overriding, but when the field is made required, only NotBlank constraint was on the form field, and when the field is not required, other constrains are on the form field - like they should be).
I "fixed" it using another way to add constrains (https://github.com/b2bcodext/cms-form-builder/blob/release/2.0/src/B2bCode/Bundle/CmsFormBundle/Resources/doc/dev_doc.md#event) and this way everything works.
JK
Hi,
When you set a form field to have a name with uppercase letters, eg. "filePDF", the data-name
attribute of the input field is generated like so: data-name="field__file-p-d-f"
.
When the form is invalid, and an error is returned, its returned using form field name ("filePDF") as index (https://github.com/b2bcodext/cms-form-builder/blob/release/2.0/src/B2bCode/Bundle/CmsFormBundle/Controller/Frontend/AjaxFormController.php#L75), but in https://github.com/b2bcodext/cms-form-builder/blob/release/2.0/src/B2bCode/Bundle/CmsFormBundle/Resources/public/js/app/components/form-component.js#L83 we are looking for the element by data-name
(which is "file-p-d-f"), not name
, and we end up not finding the element, therefore not showing the error message.
JK
I received many reports recently that after creating a new form and adding it to a landing page, when anonymous users try to submit the form - they are redirected to login page. This is because of the lack of the proper permissions for not logged in users. To fix it, go to Customer User Roles and update Anonymous User Role making sure that "Respond to CMS forms" is checked.
However, because of the confusion, I'll be removing this check in the main controller in the further releases: https://github.com/b2bcodext/cms-form-builder/blob/release/2.2/src/B2bCode/Bundle/CmsFormBundle/Controller/Frontend/AjaxFormController.php#L30
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.