sofhin
June 30, 2022, 1:06am
1
Hi.
Site name: assm-pastor.netlify.app
I have few question where input type = radio or checkbox…
When I check the form submitted, it shows the answer as the question.
I would like to show question and answer
For instance, it should be the question at the left… and answer at the right
But those at the left are one of my answer for that question.
<div class="mb-4">
<label class="form-label" for="known_level">您与申请者的熟识程度 How well do you know the applicant?</label>
<div class="form-check">
<label class="form-check-label" for="well_known">
<input class="form-check-input" type="radio" name="known_level" value="很熟 Very Well" id="well_known" required>
很熟 Very Well
</label>
</div>
<div class="form-check">
<label class="form-check-label" for="known">
<input class="form-check-input" type="radio" name="known_level" value="熟 Well" id="known" required>
熟 Well
</label>
</div>
<div class="form-check">
<label class="form-check-label" for="casually_known">
<input class="form-check-input" type="radio" name="known_level" value="不太熟 Casually" id="casually_known" required>
不太熟 Casually
</label>
</div>
<div class="form-check">
<label class="form-check-label" for="hardly_known">
<input class="form-check-input" type="radio" name="known_level" value="不熟 Hardly" id="hardly_known" required>
不熟 Hardly
</label>
</div>
<div class="invalid-feedback" data-for="known_level"></div>
</div>
Any advice?
Thank you in advance
perry
June 30, 2022, 4:43pm
2
Hi there, did you read these threads already? There might be something relevant in here:
Hi!
I am working on a somewhat larger html5 form in a Gatsby site and was wondering if there is a better way to name checkboxes/radio buttons. According to the docs and what I read here each input has to have a unique name which works fine for text-fields and even dropdowns but for checkboxes and radio buttons this gets messy quite quickly.
<label> <input type="radio" name="anrede-herr" …
Hi, anyone know why my form submissions aren’t including my checkbox fields? I’ve tried it using a single name for all checkboxes and individual names for each. My code was modified after reading several threads in these forums, but it’s still having issues.
<fieldset class="form-grid--1">
<legend class="text-dark">Services needed</legend>
<!-- Graphic Design / Branding -->
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" …
Hi there,
I’m having some trouble pulling the selected radio value in my contact form. All of the other fields within the form are pulling data correctly. I’ve tried changing the “name” attribute on the input fields and adding a “for” attribute on the legend tag, neither of which worked. Not sure if any of the extra div’s are interfering with the parser
Site can be accessed here . The contact form is revealed by clicking the Contact button in the navigation.
Any insights that you can provide …
1 Like
Hi,
Thank you for the reply.
I am sorry to say these are not the solution I am looking for.
I tried Dennis’s suggestion.
But the form will show the name instead of the question (label tag)
What I wanted is to show the question instead of showing the name.
Example:
Question: Are you able to attend?
Answer: Yes / No {name = ‘attendance’}
In the form, it should show:
Are you able to attend Yes/No
Instead of
Attendance Yes/No
Hope it clarifies
Hi @sofhin ,
Forms currently show the input names instead of the labels. There’s no way to change this. We can add a feature request for it if you wish. However, we do not know if/when the feature would be available.
This isn’t entirely true. I have a site online that uses the label for my checkbox field instead of the name. Actually this topic needs a bit more documentation imho
sofhin
July 3, 2022, 10:42pm
6
Hi.
Please submit this feature request
Thank you
sofhin
July 3, 2022, 10:43pm
7
Hi.
Can you share more on it?
Is your checkbox field only one input? Or having multiple input?
Thank you
It’s a single checkbox, indeed. I can run a couple of tests this week, I’ll keep you posted
Alright.
FYI, if single checkbox, I can get the label as well.
Thank you