Skip to content

Commit

Permalink
Added the name attribute to question types changed sumbit button
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexthePear committed Dec 30, 2023
1 parent ff24bfd commit 15ae92a
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 13 deletions.
8 changes: 3 additions & 5 deletions src/lib/components/availability_question_input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,18 @@

<label class="Question-Header" for={data.name}>{data.content}</label>
<div class="datetime-range">
{#each Array(data.maxDateRanges) as _}
{#each Array(data.maxDateRanges) as _, i}

Check failure on line 24 in src/lib/components/availability_question_input.svelte

View workflow job for this annotation

GitHub Actions / check (21.x)

'_' is defined but never used
<div class="datetime-range-input">
<input
type="datetime-local"
id="start"
name="start"
name={'start' + i}
min={data.minStartDatetime}
max={data.maxEndDatetime}
/>
<p>----</p>
<input
type="datetime-local"
id="end"
name="end"
name={'end' + i}
min={data.minStartDatetime}
max={data.maxEndDatetime}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/boolean_question_input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<label class="Question-Header" for={data.name}>{data.content}</label>
{#if data.style === 'radio'}
<input type="radio" required={data.required} bind:value={data.default} />
<input name={data.name} type="radio" required={data.required} bind:value={data.default} />
{:else}
<input type="checkbox" required={data.required} bind:value={data.default} />
<input name={data.name} type="checkbox" required={data.required} bind:value={data.default} />
{/if}
2 changes: 1 addition & 1 deletion src/lib/components/color_question_input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
</script>

<label class="Question-Header" for={data.name}>{data.content}</label>
<input type="color" required={data.required} bind:value={data.default} />
<input name={data.name} type="color" required={data.required} bind:value={data.default} />
1 change: 1 addition & 0 deletions src/lib/components/date_question_input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<label class="Question-Header" for={data.name}>{data.content}</label>
<input
name={data.name}
type="date"
required={data.required}
min={data.min}
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/datetime_question_imput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

<label class="Question-Header" for={data.name}>{data.content}</label>
<input
name={data.name}
type="datetime-local"
required={data.required}
bind:value={data.default}
Expand Down
11 changes: 6 additions & 5 deletions src/lib/components/form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
content: 'please pick one',
required: false,
required: true,
customChoice: false,
Expand All @@ -85,7 +85,7 @@
content: 'Pick a number',
required: false,
required: true,
min: 0,
Expand All @@ -100,7 +100,7 @@
content: 'text area?',
required: false,
required: true,
minLength: 0,
Expand All @@ -118,7 +118,7 @@
content: 'What Time is it?',
required: false,
required: true,
min: 0,
Expand Down Expand Up @@ -235,7 +235,8 @@
{/if}
</div>
{/each}
<button type="submit" form={currentForm.id}>Submit</button>
<input type="hidden" value={currentForm.id} />
<input type="submit" value="Sumbit" />
</form>

<!--
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/number_question_input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

<label class="Question-Header" for={data.name}> {data.content} </label>
<input
name={data.name}
type="number"
required={data.required}
min={data.min}
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/text_question_input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

<label class="Question-Header" for={data.name}>{data.content}</label>
<input
name={data.name}
type="text"
max={data.maxLength}
min={data.minLength}
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/time_question_input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<label class="Question-Header" for={data.name}>{data.content}</label>
<input
name={data.name}
type="time"
required={data.required}
bind:value={data.default}
Expand Down

0 comments on commit 15ae92a

Please sign in to comment.