Sharing a questionnaire
I want to create dynamic form using @Lara Zeus form builder but this form is more of a questionanire I need to copy and share the link to people to answer through am kindly asking id thats possible
74 Replies
yes you can
check the demo and create a test form and see if its suitable for your use case
@Lara Zeus do you have the date data type am trying out a sample form to check if it fits our use case
I have seen it
The questionnaire fits my use case but how do I options to the radio buttons , select options to the select menu and work out conditional rendering
@Lara Zeus how can we handle repeater please
there is a Dynamic Textbox field in the pro version
but you can create any custom fields you want
https://larazeus.com/docs/bolt/v3/advanced/add-fields
no following, you can add an options as a
collection
then Enable Conditional Visibilityso do I install each field type because the example provided is for the icon picker me i want to add a repeater
This has been fixed thank you
yes, you can add any field that must depend on a filament component
and the filament repeater is already installed
php artisan make:zeus-field Filament\\Forms\\Components\\Repeater
let continue and let you know
I have installed it but it does not appear among the options to choose from
it could be cached
https://larazeus.com/docs/bolt/v3/advanced/add-fields#content-caching
Custom Fields | bolt | Lara Zeus
form builder for your users, with so many use cases. | lara zeus bolt
Sorry to ask but how do I flush this bolt key
php artisan cache:clear bolt.fields
i think.
it returned an error then I only ran php artisan cache:clear
but I get the same result
How do I customize the header and footer as well?
php artisan cache:clear
should worls
check if the paths in the config file
run
php artisan vendor:publish --tag=zeus-views
it will publish the views in the view/vendors dirdone
@Lara Zeus do you mind if we have a simple google meet and you help me out
sorry cant find time currently, I will help you here as much as I can
can you share how you plan to use the repeater with a questionnaire form?
okay share I see if i can manage
how about customizing the header and the footer?
run
php artisan vendor:publish --tag=zeus-views
it will publish the views in the view/vendors dir
and there is an app blade file you can customize it
thank you that I have seen
Now the repeater
I cleared cache but the repeater has refused to appear
But so far so good thank you so much sir
I will check more on that later today and let you know
thank you I will remind you later
- are you using the Pro version?
try to rename the class from Repeater to something else like AppRepeater
no I right now am using the free version
changing it automatically causes an error
sorry no error but does not appear
it should works, test it in my demo app and the fields dose appears in the fields type menu
can you also change the title and check!
also the cache will be cleared in the dev environment
let me try
I change the title to repeater it then appeared and then I created a test repeater but when I run the form after saving it crashes
Class "App\Zeus\Fields\Filament\Forms\Components\Repeater" not found
make sure the namespace is correct
I think it should be
public string $renderClass = \Filament\Forms\Components\Repeater::class;
You have saved me alot
it works so well thank you sir @Lara Zeus
I have one more question how do you think i can achieve this please 🙏
what the plus action will do?
add another row?
the filament repeater dose support default values but not sure it will looks like that
I think you need the key value component
The repeater does have text input for me to input something
if its fit your case then use it no problem
the zeus fields is tow parts
one is for the options on the form builder
and it can be any component you want
its where the user set the default values and any other options you want to recive it on the render
and the other part is how to render it
you can check the docs for that there is an example
let me check
so about the repeater having some issues
what do you think?
the repeater is for multiple inputs per row
but from your screenshot the key value fit better i think
Yeah the repeater is for someone to record many values as they want this was a test form but the repeater works well for our use case its what we were using in raw blade
But how comes the input does not appear in the repeater
In the normal filament implementation we normally pass in a type
Do you think that is the issue?
no.
you need to take a look at other fields and how they works
for example:
vendor/lara-zeus/bolt/src/Fields/Classes/CheckboxList.php
add this to your zeus field
and customize it as you need
if you want to set the schema from the form builder UI, then you will need to take a look at the
getOptions
method
you will need to have a form builder inside the bolt form builder, I feel it will get tricky!Is this for the repeater sir because am already getting confused
yes 🙂
try the code I posted in the repeater class you will understand more
I added this and it works fine
Here I think you didnt understand very well basically this is not for the repeater its totally different just wondering if i can have such a section but not necessarily a table like labels and input
are these an inputs with labels?
no repeater or anything?
Yeah
input with labels
the repeater was for a different use case
add a new section and fields
That was just a word document
it wont look like a table tho
or they are checkboxes for one field
someone inputs
the values
can we achive that format
like this?
I honestly dont get the output you want
or this?
Thats it
How did you achive that?
yea, ok
this is not available RN, but I can add it soon.
its just an option to enable
->inlineLabel()
so i cannot use it right
not now
its fine then thank you
I will go with that since the other option is not available
But thank you sir
hello sir
when i check require login the login seems not to work
Also how can I make the repeater conditionally render
dont think this is possible, since the conditionally render require a datasource
When I tap login shows login not found
if you have different login routes than the default you will need to publish the views and edit them
am using the default filament route
what is the url of this page?
http://127.0.0.1:8002/login
thats the local version
but its the same with the hosted version
add
Route::redirect('/login', '/admin/login')->name('login');
to your route
or
publish the views and edit the url
this frontend routes is different from app to app so I cant build something for all
you will need to customize the views at some pointI get you
so meaning i can create my own simple login right
yes,
you can use the filament one, or laravel breazy, or make your own login page
the challenge how will i serve the form
Route::redirect('/login', '/admin/login')->name('login');
this will redirect to the default filament login page
you can change admin
to your panel urlThat I have already understand very well
I will create a user dashboard and redirect to their dashboard
not following?
for the require login I honestly totally get you
But after that how will they answer the questionnaire
should i just redirect them to the page with the questionnaire
after they log in you would redirect them to the same form and it will be open
great stuff thank you sir
I will let you know soon
working on it
return redirect()->intended();
will helpHello
I added the basic breeze so now users are able to register
but how do I get the questionnaire route
to redirect to
Your thread is 122 messages long, so I won't catch up on it and I'd recommend you to open new threads for new questions.
If questionnaire is a page you should be able to run
Questionnaire:getUrl()
Thats abit more confusing but let me open a new thread