Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Changing field type does not update on form

Changing field type does not update on form 06 Jul 2016 15:04 #14161

when i change the field type in the models>forms>form.xml it does not change the form when loaded any idea why?

Original:
<field name="password"
alias="password"
label="BARTSCHOIR_FIELD_PASSWORD"
filter="STRING"
type="cktext"
required="true"
class="validate[required]"/>
New:
<field name="password"
alias="password"
label="BARTSCHOIR_FIELD_PASSWORD"
filter="STRING"
type="cktextarea"
required="true"
class="validate[required]"/>
The administrator has disabled public write access.

Changing field type does not update on form 06 Jul 2016 15:25 #14162

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Does the cktextarea exists ? in :
models/fields

Because if your component do not use it, cook will not include it.
Simple as that.

Regenerate you component with a textarea inside, or take it from another component.
I guess this is the problem.
Coding is now a piece of cake
The administrator has disabled public write access.

Changing field type does not update on form 06 Jul 2016 15:52 #14163

Thanks for the reply, yes it does exist. I am intending on creating my own ckpassword type but if its not changing to even the default ones I think this might hinder me...
The administrator has disabled public write access.

Changing field type does not update on form 06 Jul 2016 16:27 #14164

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Ok, so I will have a look.

Wich PTL ? (Project / Table / Layout)

Moved in tickets.
Coding is now a piece of cake
The administrator has disabled public write access.

Changing field type does not update on form 06 Jul 2016 16:41 #14166

Thanks very much.

Project: Barts Choir
Table: User Information
Layout: Sign Up Form
The administrator has disabled public write access.

Changing field type does not update on form 07 Jul 2016 09:56 #14175

Were you able to recreate my issue?
The administrator has disabled public write access.

Changing field type does not update on form 07 Jul 2016 12:03 #14178

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
For me it is working in a fresh install.

Are you editing the correct form ?
edituserdetails.form
signupform.form <- THIS ONE

By the way I saw a misspelling (county instead of country). just a remark for you.
Coding is now a piece of cake
The administrator has disabled public write access.

Changing field type does not update on form 07 Jul 2016 12:42 #14180

oh whoops, I have just noticed that i am infact editing the wrong form, as I have multiple versions of the form I didnt realise they were in the same xml file... My bad, thanks for the help very much appreciated.

Oh and its not a spelling mistake in the UK we section areas by county. I do not need to define the country.

Thanks again and sorry for wasting your time.
The administrator has disabled public write access.

Changing field type does not update on form 07 Jul 2016 12:54 #14181

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
No problem. You are welcome.
Coding is now a piece of cake
The administrator has disabled public write access.

Changing field type does not update on form 07 Jul 2016 12:57 #14182

Any advice on creating a ckpassword type? no worries if not.
The administrator has disabled public write access.

Changing field type does not update on form 07 Jul 2016 13:05 #14183

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
You can create PHP static such as JHtml in the ckpassword file.

Otherwise, better with JDom,
copy the cktext field, just add the parameters sent to JDom :
..
'modifiers' => array(
   'type' => 'password'
)
...

Not tested, but should work. It is by memory. Let's see if it does not enter in conflict because 'type' is already defined. It might be outputed twice. To test.

... The power of JDom !!!
Other possibility, create a new JDom plugin, and call it from your field. (Take the example from textarea).
When you have done it, you can also PR on github your control
Coding is now a piece of cake
Last Edit: 07 Jul 2016 13:11 by admin.
The administrator has disabled public write access.

Changing field type does not update on form 07 Jul 2016 13:07 #14185

Thanks for the help, I'll try it out shortly and let you know.
The administrator has disabled public write access.

Changing field type does not update on form 07 Jul 2016 16:31 #14187

Got it working, had to create a new jDom type though. Bit busy at the mo to post my method but will do at a more convinient point in time.

Thanks again for the help!
The administrator has disabled public write access.
Time to create page: 0.201 seconds

Get Started