You are here:  » Default Field Value

Support Forum



Default Field Value

Submitted by noodles on Mon, 2006-10-23 19:13 in

Is there any way, if a field is empty, to insert a default value such as Unbranded in the Brand field?

Submitted by noodles on Mon, 2006-10-23 19:17

Sorry, just found the answer http://www.pricetapestry.com/node/428

Submitted by noodles on Mon, 2006-10-23 20:44

Well, I thought I'd found the answer bit it doesn't seem to work. If I enter 'Unbranded' in the optional index field for the Brand it replaces any field that had a value in it with 'Unbranded' and leaves any with no value blank.

Have I misunderstood how this should work?

Thanks
Dave

Submitted by support on Tue, 2006-10-24 08:20

Hi,

The modification described in that thread is not actually part of the distribution, so you will need to make the changes to includes/admin.php as described to get that functionality...

Cheers,
David.

Submitted by noodles on Tue, 2006-10-24 14:43

It's odd but it doesn't work for me, i've tried it as the original script, i get all the Brands imported and empty fields where there is no brand, as expected. I tried the mod, and where there is a brand value it changes this to Unbranded and leaves all the other fields blank.

What i'm after is for teh script to leave the Brand intact where there is a value & enter Unbranded into the empty fields, which as far as i can see is what the mod should do?

Any ideas what i'm doing wrong?

Submitted by support on Tue, 2006-10-24 14:47

Hi,

That is exacty what the mods should do! Can you send me your modified includes/admin.php (reply to your reg code or forum reg email) and i'll take a look...

Cheers,
David.