You are viewing limited content. For full access, please sign in.

Question

Question

Adding values in dropdown list forms with jquery

asked on June 1, 2017 Show version history

Hello all,

I have a jquery code that takes the column values of a table and inserts them into a dropdown list with the value and text.

on submit forms gives me the following error  :

Laserfiche Forms has encountered a problem.

Errors encountered during forms submission: 
Field Name: إسم المورد, Position: 13, Error: This value does not belong to the list of choices. [LFF9309-InvalidChoice] [LFF9312-ErrorOccuredDuringFormsValidation]
You can click the back button on the browser to correct and resubmit the form. [LFF9320-FormsValidationAggregateException]

0 0

Answer

SELECTED ANSWER
replied on June 4, 2017

The form has backend validation enabled which does not accept values other than configured.

So if you want to add new choice by script, you need to disable backend validation on the form.

The option is on Forms Settings -> Backend validation, change validation level to "no validation".

1 0

Replies

replied on June 1, 2017 Show version history
 	$("#q62").find("[id^=Field56]").each(function() { 
  		$('#q55').find('select').append($("<option></option>").attr("value",$(this).val()).text($(this).val()));
	});

This is the jquery code.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.