
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
This gem encapsulates the logic to create and manage forms, so it can be reused in other modules, like surveys and meetings.
A Decidim::Forms::Question
must be of one of the types:
Here are the relations between the classes of a Decidim::Questionnaire
:
1..* +----------+ 1..* +--------------+
+------------->| Question |------------->| AnswerOption |
| +-----+----+ +------+-------+
| ^ 1..1 ^ 1..*
| | |
| | |
+-------+-------+ 1..* +---+----+ 1..* +------+-------+
| Questionnaire +------->| Answer |<-------------+ AnswerChoice |
+---------------+ +---+----+ +--------------+
|
|
v 1..1
+--+---+
| User |
+------+
Add this line to your module's gemspec:
s.add_dependency "decidim-forms", Decidim::YourModule.version
And then execute:
bundle
See Decidim.
See Decidim.
Since questionnaires cannot exist without a component we are not including specific seeds for this engine.
Other engines are free to include questionnaires on their seeds like this:
Decidim::Forms::Questionnaire.new(
title: Decidim::Faker::Localized.paragraph,
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
Decidim::Faker::Localized.paragraph(3)
end,
tos: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
Decidim::Faker::Localized.paragraph(2)
end,
)
Decidim::Surveys::Survey.create!(component: component, questionnaire: questionnaire)
%w(short_answer long_answer).each do |text_question_type|
Decidim::Forms::Question.create!(
questionnaire: questionnaire,
body: Decidim::Faker::Localized.paragraph,
question_type: text_question_type
)
end
%w(single_option multiple_option).each do |multiple_choice_question_type|
question = Decidim::Forms::Question.create!(
questionnaire: questionnaire,
body: Decidim::Faker::Localized.paragraph,
question_type: multiple_choice_question_type
)
3.times do
question.answer_options.create!(body: Decidim::Faker::Localized.sentence)
end
end
FAQs
Unknown package
We found that decidim-forms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.