Page 1 of 1

Fast Forms

Posted: Mon Nov 19, 2018 1:04 am
by alf1976
Hi Steven,

i cant create fastforms properly.

i get
'SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'sbr_align' at row 1'

looking into this the table sbr_align is CHAR(1) but examining the code in nubuilders.php

Code: Select all

	$sql            = "
			
							INSERT 
							INTO zzzzsys_browse
							(zzzzsys_browse_id,
							sbr_zzzzsys_form_id,
							sbr_title,
							sbr_display,
							sbr_align,
							sbr_format,
							sbr_order,
							sbr_width)
							VALUES
							(?, ?, ?, ?, ?, ?, ?, ?)
			
			";
			
			$array      = Array(nuID(), $form_id, $lab, $id, 'left', '', ($i+1) * 10, 250);

			nuRunQuery($sql, $array);
the routine is trying to insert 'left' (four characters) into a one character field thus generating the error

altering this to appears to correct the issue

Code: Select all

$array      = Array(nuID(), $form_id, $lab, $id, 'l', '', ($i+1) * 10, 250);

Re: Fast Forms

Posted: Mon Nov 19, 2018 3:04 am
by admin
Andrew,

Try pulling that latest from Github. - it will now just add an 'l' instead of 'left'


Steven

Re: Fast Forms

Posted: Tue Nov 20, 2018 12:16 am
by alf1976
all good

Andrew

Re: Fast Forms

Posted: Tue Nov 20, 2018 12:47 am
by admin
.