Text Fields
-
i set columns as text. now they are multiline text. how can i make them single line text ? ( frant-end and back-end )
-
Hi @recepbala,
Could you give us more details about what you’re trying to achieve?
Is this for columns on Data Publisher?
Could you send us the link to your table as well?
Looking forward to your response! 🙂
name, middle name, surnames are columns as text type. but they appear as multiline text box. they better be single line text box for sure. you can check images.
text fields
https://prnt.sc/heuWAqSMn1R8table designer
https://prnt.sc/05yJQ-hwYwfP- This reply was modified 1 year, 5 months ago by recepbala.
Hi @recepbala,
All columns of type text are automatically shown as multi line fields. Please switch from Basic Design Mode to Advanced Design Mode in the Data Designer to get access to more detailed column settings. Then change your column type to varchar and define a max length (200 characters for example). Save your design and click the alter table button to update the physical table.
Please let us know if this helps,
Peterthere is one more thing that i could not handle 🙂
recorddate and lastupdate columns got their default values are set at designer.
but when i enter new record, those columns are recorded empty
using mysql / MyISAMvarchar did work, thanks 🙂
Hi @recepbala,
Good you fixed the varchar issue. Can you share your create table script regarding the empty columns? Please use the contactform on the plugin website if you prefer to share this informaiton in private.
How do you enter your data?
Thanks,
Peterdata entered from front end and back end and no difference 🙁
table designer
https://prnt.sc/05yJQ-hwYwfPmysql
https://prnt.sc/DZhk1A_ilJgPSQL / create table script
CREATE TABLEcustomers
(customer_id
int(11) NOT NULL auto_increment
,recorddate
datetime NULL DEFAULT CURRENT_TIMESTAMP
,lastupdate
datetime NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
,customer_name
varchar(50) NOT NULL
,customer_middlename
varchar(50) NULL
,customer_lastname
varchar(50) NOT NULL
,customer_country
varchar(50) NOT NULL
,PRIMARY KEY (customer_id
)
) ENGINE MyISAM DEFAULT CHARACTER SET utf16 COLLATE=utf16_unicode_ci;Hi @recepbala,
Thanks for explaning!
Your code works when you execute an insert from SQL. But it does not work from a default data entry form. The date fields in your form have their own (empty) value which will be saved on commit.
To solve this issue you need to create a template for your table and give your date fields default value $$NOWDT$$. This is documented here:
https://wpdataaccess.com/docs/project-templates/data-entry/This will enter the default value but also allow the user to overwrite it. You can prevent this by removing these fields from your form (just disable the visible checkbox for both fields). A database trigger would solve this as well.
Does this solve the issue?
Peterthank you
- The topic ‘Text Fields’ is closed to new replies.