Setting Custom Form field to a string w/o customer interaction

Regular Participant

Setting Custom Form field to a string w/o customer interaction

Hi All,

I'm new to PHP, so hopefully this in not too lame of a question, but I've tried to solve this issue without success, so any guidance would be greatly appreciated.

I'm using your PHP samples and the "Add_Contact.php" script.  As published, the script works w/o an problems, but I would  like to remove the Custom Fields from the webpage, again this was easy and everything works OK.  Finally I would like to force "Custom Field #1" to be a string i.e. "ABCD..." for every contact who adds their name to the mailing list, without their ability to change this data.

I have tried everything I know to do and I cannot set the custom field to a string.  As I said above, I'm sure even to a causal programmer this is a lame question but I need your assistance.

Thank you in advance for any help you can offer.


I hope that I am understanding your question correctly, please correct me if I am not.


If you are looking to have every subscriber automatically have the same "Custom Field #1", and not have the ability to modify this, you could change the form field for custom field 1 from the type "text" to the type "hidden". Then you would make the value of this input whatever it is you are looking to use as custom field 1. For example:


<input type="hidden" name="custom_field_1" maxLength="50"  value="ABCD..." />


This will cause the form field to be hidden from the user, so they will not be able to modify or see this field. However, each contact would have the value of "ABCD..." as their Custom Field 1. I hope this helps.

David J

Regular Participant

Hi David,

Perfect - - That did the trick, exactly what I wanted.

Thank you for your information and most importantly, your quick reply.


Developer Portal

View API documentation, code samples, get your API key.

Visit Page