Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Fast Forms

Questions related to using nuBuilder Forte.
Locked
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Fast Forms

Unread post 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);
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Fast Forms

Unread post by admin »

Andrew,

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


Steven
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: Fast Forms

Unread post by alf1976 »

all good

Andrew
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Fast Forms

Unread post by admin »

.
Locked